UNPKG

next-sanity

Version:
1 lines 1.06 kB
{"version":3,"file":"client-component.cjs","sources":["../../src/studio/client-component/NextStudioLazy.tsx"],"sourcesContent":["/**\n *\n * If pages router supported `next/dynamic` imports (it wants `next/dynamic.js`),\n * or if turbopack in app router allowed `next/dynamic.js` (it doesn't yet)\n * we could use `dynamic(() => import('...), {ssr: false})` here.\n * Since we can't, we need to use a lazy import and Suspense ourself.\n */\n\nimport {lazy, Suspense} from 'react'\n\nimport type {NextStudioProps} from './NextStudio'\n\nconst NextStudioClientComponent = lazy(() => import('./NextStudio'))\n\nexport function NextStudioLazyClientComponent(props: NextStudioProps): React.ReactNode {\n return (\n <Suspense fallback={null}>\n <NextStudioClientComponent {...props} />\n </Suspense>\n )\n}\n"],"names":["lazy","jsx","Suspense"],"mappings":";;;;AAYA,MAAM,4BAA4BA,MAAA,KAAK,MAAM,QAAO,QAAA,EAAA,KAAA,WAAA;AAAA,SAAA,QAAA,+BAAc;EAAC;AAE5D,SAAS,8BAA8B,OAAyC;AAEnF,SAAAC,+BAACC,MAAAA,YAAS,UAAU,MAClB,yCAAC,2BAA2B,EAAA,GAAG,OAAO,EACxC,CAAA;AAEJ;;"}