Skip to content

Commit 33e6e40

Browse files
committed
fix(sanity): loosen TierListStudioInput props type to satisfy studio typecheck
1 parent 1ab2e9a commit 33e6e40

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎apps/sanity/components/TierListStudioInput.tsx‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,12 @@ export function serializeTierItemsToMarkdownTable(
207207
return [headerLine, sepLine, ...bodyLines].join("\n");
208208
}
209209

210-
export function TierListStudioInput(
211-
props: ObjectInputProps<StudioTierListValue>,
212-
) {
213-
const { value, onChange } = props;
210+
// `props: any` matches BlockEditor/YouTubePreview: pnpm resolves two copies of
211+
// sanity@6.20.0, so ObjectInputProps from this file is not assignable to the
212+
// one `components.input` expects.
213+
export function TierListStudioInput(props: any) {
214+
const { onChange } = props as ObjectInputProps;
215+
const value = props.value as StudioTierListValue | undefined;
214216
const current: StudioTierListValue = value ?? { _type: "tierList" };
215217
const items: StudioTierItem[] = Array.isArray(current.items)
216218
? current.items

0 commit comments

Comments
 (0)