diff --git a/src/app/(withGlobalData)/layout.tsx b/src/app/(withGlobalData)/layout.tsx
new file mode 100644
index 0000000..338fa39
--- /dev/null
+++ b/src/app/(withGlobalData)/layout.tsx
@@ -0,0 +1,15 @@
+import { getMovies } from "@/lib/db";
+import { GlobalStoreProvider } from "../store/globalStore";
+
+export const revalidate = 0;
+export default async function WithGlobalDataLayout({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ const movies = await getMovies();
+
+ return (
+ {children}
+ );
+}
diff --git a/src/app/page.tsx b/src/app/(withGlobalData)/page.tsx
similarity index 100%
rename from src/app/page.tsx
rename to src/app/(withGlobalData)/page.tsx
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 79ff54d..2dca72d 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -2,7 +2,6 @@ import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { Navbar } from "@/components/organisms/Navbar";
-import { GlobalStoreProvider } from "./store/globalStore";
const geistSans = Geist({
variable: "--font-geist-sans",
@@ -29,7 +28,7 @@ export default async function RootLayout({
- {children}
+ {children}