This commit is contained in:
qt-coder 2021-06-29 11:34:23 +08:00
parent 7e434806e0
commit b538eb5065

View file

@ -22,9 +22,11 @@ import {
ChevronRightIcon,
} from '@chakra-ui/icons';
import AuthButton from '../AuthButton'
import { signIn, signOut, useSession } from 'next-auth/client';
export default function WithSubnavigation() {
const { isOpen, onToggle } = useDisclosure();
const [session, loading] = useSession()
return (
<Box>
@ -69,14 +71,13 @@ export default function WithSubnavigation() {
justify={'flex-end'}
direction={'row'}
spacing={6}>
<AuthButton/>
<Button
as={'a'}
fontSize={'sm'}
fontWeight={400}
variant={'link'}
href={'https://github.com/night0721/cath.gq'}>
Github
onClick={session ? ()=>{signOut()} : ()=>{signIn()}}>
{session ? 'Sign Out' : 'Sign In'}
</Button>
</Stack>
</Flex>