"use client"; import { FC } from "react"; import { Box, Grid, Container, IconButton } from "@mui/material"; import { Apple as AppleIcon, Google as GoogleIcon } from "@mui/icons-material"; import { signIn } from "next-auth/react"; type LoginProps = { session: any; }; export const Login: FC = ({ session }) => { const origin = typeof window !== "undefined" && window.location.origin ? window.location.origin : ""; const buttonStyles = { borderRadius: 500, width: "100%", fontSize: "16px", fontWeight: "bold", }; return ( <> {!session ? ( signIn("google", { callbackUrl: `${origin}/setup`, }) } > Google {/* signIn("apple", { callbackUrl: `${window.location.origin}/setup`, }) } > */} ) : null} {session ? ( {` ${session.user.name ?? session.user.email}.`} ) : null} ); };