We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ac21dc commit 1fa0947Copy full SHA for 1fa0947
pages/_app.js
@@ -1,5 +1,6 @@
1
import { Footer, Header } from '@scientist-softserv/webstore-component-library'
2
import { SWRConfig } from 'swr'
3
+import { useRouter } from 'next/router'
4
import {
5
SessionProvider,
6
signIn,
@@ -19,13 +20,19 @@ import '../utils/theme/globals.scss'
19
20
21
const WebStore = ({ Component }) => {
22
const { data: session } = useSession()
23
+ const router = useRouter()
24
+
25
+ const signOutUser = () => {
26
+ signOut()
27
+ router.push('/')
28
+ }
29
30
return (
31
<>
32
<Header
33
auth={{
34
signIn: () => signIn(process.env.NEXT_PUBLIC_PROVIDER_NAME),
- signOut: signOut,
35
+ signOut: signOutUser,
36
}}
37
linkColor={headerAndFooterLinkColors}
38
logo={LOGO}
0 commit comments