From 57a26afd9719de585d6449e8a59d34ab32a956c7 Mon Sep 17 00:00:00 2001 From: Samya brata Maji Date: Fri, 11 Aug 2023 23:49:41 +0530 Subject: [PATCH] feat: static pages --- app/(main)/{ => (static)}/layout.tsx | 2 +- app/(main)/{ => (static)}/page.tsx | 4 ++-- app/(main)/(with-auth)/dashboard/layout.tsx | 14 ++++++++++++++ app/(main)/(with-auth)/dashboard/page.tsx | 10 ++++++++++ app/(main)/dashboard/page.tsx | 5 ----- middleware.ts | 4 ++-- 6 files changed, 29 insertions(+), 10 deletions(-) rename app/(main)/{ => (static)}/layout.tsx (84%) rename app/(main)/{ => (static)}/page.tsx (91%) create mode 100644 app/(main)/(with-auth)/dashboard/layout.tsx create mode 100644 app/(main)/(with-auth)/dashboard/page.tsx delete mode 100644 app/(main)/dashboard/page.tsx diff --git a/app/(main)/layout.tsx b/app/(main)/(static)/layout.tsx similarity index 84% rename from app/(main)/layout.tsx rename to app/(main)/(static)/layout.tsx index 9083016..92ac275 100644 --- a/app/(main)/layout.tsx +++ b/app/(main)/(static)/layout.tsx @@ -7,7 +7,7 @@ export default function LayoutMain({ }) { return (
- + {undefined} {children}
); diff --git a/app/(main)/page.tsx b/app/(main)/(static)/page.tsx similarity index 91% rename from app/(main)/page.tsx rename to app/(main)/(static)/page.tsx index 8bf565d..9562435 100644 --- a/app/(main)/page.tsx +++ b/app/(main)/(static)/page.tsx @@ -16,8 +16,8 @@ export default function Home() { Launch in Seconds - Lorem ipsum dolor sit amet consectetur adipisicing elit. - Unde aut quas provident vero illum. + A simple customizable starter kit to quickly bootstrap a + Next.js project.
diff --git a/app/(main)/(with-auth)/dashboard/layout.tsx b/app/(main)/(with-auth)/dashboard/layout.tsx new file mode 100644 index 0000000..feceb20 --- /dev/null +++ b/app/(main)/(with-auth)/dashboard/layout.tsx @@ -0,0 +1,14 @@ +import Navbar, { NavbarWithAuth } from "@/components/navbar"; + +export default function LayoutMain({ + children, +}: { + children: React.ReactNode; +}) { + return ( +
+ + {children} +
+ ); +} diff --git a/app/(main)/(with-auth)/dashboard/page.tsx b/app/(main)/(with-auth)/dashboard/page.tsx new file mode 100644 index 0000000..fdd5496 --- /dev/null +++ b/app/(main)/(with-auth)/dashboard/page.tsx @@ -0,0 +1,10 @@ +import { TypographyH1 } from "@/components/ui/typography"; +import React from "react"; + +export default function PageDashboard() { + return ( +
+ Dashboard +
+ ); +} diff --git a/app/(main)/dashboard/page.tsx b/app/(main)/dashboard/page.tsx deleted file mode 100644 index ecf2099..0000000 --- a/app/(main)/dashboard/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import React from "react"; - -export default function PageDashboard() { - return
; -} diff --git a/middleware.ts b/middleware.ts index b2e56f2..d0426b6 100644 --- a/middleware.ts +++ b/middleware.ts @@ -4,8 +4,8 @@ import { authMiddleware } from "@clerk/nextjs"; // Please edit this to allow other routes to be public as needed. // See https://clerk.com/docs/nextjs/middleware for more information about configuring your middleware export default authMiddleware({ - publicRoutes: ["/", "/(github|twitter|linkedin)"], - ignoredRoutes: ["/(api|trpc)(.*)"], + publicRoutes: ["/(github|twitter|linkedin)"], + ignoredRoutes: ["/", "/(api|trpc)(.*)"], clockSkewInMs: 100_000, clockSkewInSeconds: 100, });