Fixed #11
This commit is contained in:
parent
7e434806e0
commit
b538eb5065
1 changed files with 4 additions and 3 deletions
|
@ -22,9 +22,11 @@ import {
|
||||||
ChevronRightIcon,
|
ChevronRightIcon,
|
||||||
} from '@chakra-ui/icons';
|
} from '@chakra-ui/icons';
|
||||||
import AuthButton from '../AuthButton'
|
import AuthButton from '../AuthButton'
|
||||||
|
import { signIn, signOut, useSession } from 'next-auth/client';
|
||||||
|
|
||||||
export default function WithSubnavigation() {
|
export default function WithSubnavigation() {
|
||||||
const { isOpen, onToggle } = useDisclosure();
|
const { isOpen, onToggle } = useDisclosure();
|
||||||
|
const [session, loading] = useSession()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
|
@ -69,14 +71,13 @@ export default function WithSubnavigation() {
|
||||||
justify={'flex-end'}
|
justify={'flex-end'}
|
||||||
direction={'row'}
|
direction={'row'}
|
||||||
spacing={6}>
|
spacing={6}>
|
||||||
<AuthButton/>
|
|
||||||
<Button
|
<Button
|
||||||
as={'a'}
|
as={'a'}
|
||||||
fontSize={'sm'}
|
fontSize={'sm'}
|
||||||
fontWeight={400}
|
fontWeight={400}
|
||||||
variant={'link'}
|
variant={'link'}
|
||||||
href={'https://github.com/night0721/cath.gq'}>
|
onClick={session ? ()=>{signOut()} : ()=>{signIn()}}>
|
||||||
Github
|
{session ? 'Sign Out' : 'Sign In'}
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
Loading…
Reference in a new issue