diff --git a/src/app/(dashboard)/page.tsx b/src/app/(dashboard)/page.tsx new file mode 100644 index 0000000..84e935f --- /dev/null +++ b/src/app/(dashboard)/page.tsx @@ -0,0 +1,14 @@ +import { redirect } from "next/navigation"; +import { getCurrent } from "@/features/auth/actions"; + +export default async function HomePage() { + const user = await getCurrent(); + + if (!user) redirect("/sign-in"); + + return ( +
+ This is a home page +
+ ); +} diff --git a/src/app/page.tsx b/src/app/page.tsx deleted file mode 100644 index 3eee014..0000000 --- a/src/app/page.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import Image from "next/image"; - -export default function Home() { - return ( -
-
- Next.js logo -
    -
  1. - Get started by editing{" "} - - src/app/page.tsx - - . -
  2. -
  3. Save and see your changes instantly.
  4. -
- -
- - Vercel logomark - Deploy now - - - Read our docs - -
-
- -
- ); -}