aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/page.tsx
blob: 13777a96b632678baed82ed57632df792b02c31f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import Image from "next/image";
import { Metadata } from "next";
import Link from "next/link";
import { getSession } from "@auth0/nextjs-auth0";
import { redirect } from "next/navigation";

export const metadata: Metadata = {
  title: "IBD Trader",
};

export default async function Home() {
  const user = await getSession();

  if (user) {
    redirect("/dashboard");
  }

  return (
    <div className="min-h-screen flex flex-col items-center justify-center bg-gray-100">
      <main className="flex flex-col items-center justify-center w-full flex-1 px-20 text-center">
        <div className="flex justify-center">
          <Image src="/logo.svg" alt="IBD Trader" width={200} height={200} />
        </div>
        <h1 className="text-6xl font-bold mt-4">Trader</h1>
        <button className="mt-16 px-6 py-3 bg-blue-500 text-white rounded-md hover:bg-blue-600">
          <Link href="/api/auth/login">Login</Link>
        </button>
      </main>
    </div>
  );
}