From 0cc065171b0825bbae569d86584f49526fae1122 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 28 Mar 2025 13:01:28 +0000 Subject: [PATCH] fix: render preview with custom element --- cms/schemaTypes/{location.ts => location.tsx} | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename cms/schemaTypes/{location.ts => location.tsx} (92%) diff --git a/cms/schemaTypes/location.ts b/cms/schemaTypes/location.tsx similarity index 92% rename from cms/schemaTypes/location.ts rename to cms/schemaTypes/location.tsx index 3f220312..1b88521e 100644 --- a/cms/schemaTypes/location.ts +++ b/cms/schemaTypes/location.tsx @@ -2,7 +2,7 @@ import { defineField, defineType } from 'sanity' export default defineType({ name: 'location', - title: 'Current Location', + title: 'Current location', type: 'document', preview: { select: { @@ -21,8 +21,8 @@ export default defineType({ return { title: `${city}${country ? `, ${country}` : ''}`, - subtitle: 'Current Location', - media: flagEmoji, + subtitle: 'Current location', + media: {flagEmoji}, } }, }, @@ -54,12 +54,12 @@ export default defineType({ defineField({ name: 'latitude', title: 'Latitude', - type: 'number', + type: 'string', }), defineField({ name: 'longitude', title: 'Longitude', - type: 'number', + type: 'string', }), defineField({ name: 'meetupAvailable', -- 2.54.0