mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
show when logged in
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
import React from 'react'
|
||||
import '../styles/index.css'
|
||||
import UserContext from '../components/user/context'
|
||||
|
||||
export default function MyApp({ Component, pageProps }) {
|
||||
const { username, role } = pageProps?.user || {}
|
||||
|
||||
return (
|
||||
<div className="wrapper">
|
||||
<Component {...pageProps} />
|
||||
<UserContext.Provider value={{ username, role }}>
|
||||
<Component {...pageProps} />
|
||||
</UserContext.Provider>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user