From b38d62f5908c044c0146a0ac688ac8f53cac8338 Mon Sep 17 00:00:00 2001
From: jerensl <54782057+jerensl@users.noreply.github.com>
Date: Fri, 5 Jul 2024 14:46:37 +0800
Subject: [PATCH] fix(cold-start): add another component as layer for lazy
loading
---
apps/studio-next/src/app/page.tsx | 5 ++---
apps/studio-next/src/components/StudioEditor.tsx | 10 ++++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
create mode 100644 apps/studio-next/src/components/StudioEditor.tsx
diff --git a/apps/studio-next/src/app/page.tsx b/apps/studio-next/src/app/page.tsx
index 05bde7e06..e61bc475b 100644
--- a/apps/studio-next/src/app/page.tsx
+++ b/apps/studio-next/src/app/page.tsx
@@ -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'),
@@ -25,6 +24,6 @@ export const metadata: Metadata = {
}
export default async function Home() {
return (
-
+
)
}
diff --git a/apps/studio-next/src/components/StudioEditor.tsx b/apps/studio-next/src/components/StudioEditor.tsx
new file mode 100644
index 000000000..4a946f185
--- /dev/null
+++ b/apps/studio-next/src/components/StudioEditor.tsx
@@ -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 (
+
+ )
+}