Skip to content

Commit 0150cea

Browse files
committed
refactor: update table import and configuration in sanity.config.ts
- Commented out the optional @sanity/table import and adjusted the schema registration to use tableSchema instead. - Updated the plugin initialization to reflect the change in table registration, ensuring compatibility with the optional table UI.
1 parent 695fe68 commit 0150cea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sanity.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { type PluginOptions, defineConfig } from "sanity";
77
import { cloudinarySchemaPlugin } from "sanity-plugin-cloudinary";
88
// import { tags } from "sanity-plugin-tags";
99
import { codeInput } from "@sanity/code-input";
10-
import { table } from "@sanity/table";
10+
// import { table } from "@sanity/table"; // optional: add @sanity/table for studio table UI
1111
// import { iconPicker } from "sanity-plugin-icon-picker" https://github.com/christopherafbjur/sanity-plugin-icon-picker/issues/73;
1212
import { podcastRss } from "@codingcatdev/sanity-plugin-podcast-rss";
1313

@@ -51,7 +51,7 @@ import contentIdea from "@/sanity/schemas/documents/contentIdea";
5151
import automatedVideo from "@/sanity/schemas/documents/automatedVideo";
5252
import sponsorLead from "@/sanity/schemas/documents/sponsorLead";
5353
import sponsorPool from "@/sanity/schemas/documents/sponsorPool";
54-
import table, { rowType } from "@/sanity/schemas/custom/table";
54+
import tableSchema, { rowType } from "@/sanity/schemas/custom/table";
5555
import { resolveHref } from "@/sanity/lib/resolveHref";
5656

5757
const homeLocation = {
@@ -135,7 +135,7 @@ export default defineConfig({
135135
schema: {
136136
types: [
137137
// Portable text block types (table)
138-
table,
138+
tableSchema,
139139
rowType,
140140
// Singletons
141141
settings,
@@ -213,7 +213,7 @@ export default defineConfig({
213213
// https://www.sanity.io/docs/ai-assistPcli
214214
assistWithPresets(),
215215
cloudinarySchemaPlugin(),
216-
table(),
216+
// table(), // enable when @sanity/table is installed
217217
// tags(),
218218
codeInput(),
219219
// iconPicker(),

0 commit comments

Comments
 (0)