Minor tweaks
This commit is contained in:
@@ -17,7 +17,7 @@ export const MainContent = () => {
|
||||
login: Login,
|
||||
admin: AdminPanel,
|
||||
apiKeys: ApiKeys,
|
||||
}[route.id] || (() => <>Error</>)
|
||||
}[route.id] || (() => <>Still nothing here</>)
|
||||
|
||||
return (
|
||||
<div class={`main-content route-${changeCase('camel', 'dash', route.id)}`}>
|
||||
|
||||
@@ -43,6 +43,9 @@ const App = () => {
|
||||
if (id !== 'login' && user !== 'admin') {
|
||||
location.href = '/login'
|
||||
}
|
||||
if (id === 'login' && user === 'admin') {
|
||||
location.href = '/'
|
||||
}
|
||||
})
|
||||
|
||||
const [toasts, setToasts] = useState([])
|
||||
|
||||
Reference in New Issue
Block a user