Skip to content

Commit

Permalink
add id for createCollection sanity builder
Browse files Browse the repository at this point in the history
  • Loading branch information
milewskibogumil committed Sep 21, 2024
1 parent bf677f5 commit 6264676
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/sanity/structure/create-collection.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { StructureBuilder } from "sanity/structure";
import { schemaTypes } from "./schema-types";
import { TYPES_TO_EXCLUDE_PREVIEWS } from ".";
import { Preview } from "./preview";
import { TYPES_TO_EXCLUDE_PREVIEWS } from ".";

export const createCollection = (S: StructureBuilder, name: string) => {
const { title, icon } = schemaTypes.find(item => item.name === name) as { title: string, icon: React.ReactNode };
return S.listItem()
.id(name)
.title(title)
.icon(icon)
.child(
Expand Down

0 comments on commit 6264676

Please sign in to comment.