import { useUser, useConfig } from './auth'
import { useLocation, Link } from 'react-router-dom'
function NavBarItem (props) {
const location = useLocation()
const isActive = (props.href && location.pathname.startsWith(props.href)) || (props.to && location.pathname.startsWith(props.to))
const cls = isActive ? 'nav-link active' : 'nav-link'
return (
{props.href
? {props.icon} {props.name}
: {props.icon} {props.name}}
)
}
export default function NavBar () {
const user = useUser()
const config = useConfig()
const anonNav = (
<>
>
)
const authNav = (
<>
{config.data.socialaccount
?
: null}
{config.data.mfa
?
: null}
{config.data.usersessions
?
: null}
>
)
return (
)
}