Skip to content

Commit

Permalink
fix(cold-start): add another component as layer for lazy loading
Browse files Browse the repository at this point in the history
  • Loading branch information
jerensl committed Jul 5, 2024
1 parent a428b15 commit b38d62f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/studio-next/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import dynamic from 'next/dynamic';
const StudioWrapper = dynamic(() => import('@/components/StudioWrapper'), {ssr: false})
import { Metadata } from 'next';
import ogImage from '@/img/meta-studio-og-image.jpeg';
import StudioEditor from '@/components/StudioEditor';

export const metadata: Metadata = {
metadataBase: new URL('https://studio-next.netlify.app'),
Expand All @@ -25,6 +24,6 @@ export const metadata: Metadata = {
}
export default async function Home() {
return (
<StudioWrapper />
<StudioEditor />
)
}
10 changes: 10 additions & 0 deletions apps/studio-next/src/components/StudioEditor.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use client'
import dynamic from 'next/dynamic'
const StudioWrapper = dynamic(() => import('@/components/StudioWrapper'), {ssr: false})


export default async function StudioEditor() {
return (
<StudioWrapper />
)
}

0 comments on commit b38d62f

Please sign in to comment.