import { Suspense } from "react";
import { Metadata } from "next";
import { getSession } from "next-auth/react";
import { Login } from "./_components/Login";

export const metadata: Metadata = {
  title: "CDR Link - Login",
};

export default async function Page() {
  const session = await getSession();
  const baseURL = process.env.LINK_URL;

  return (
    <Suspense fallback={<div>Loading...</div>}>
      <Login session={session} baseURL={baseURL} />
    </Suspense>
  );
}
