fix router

This commit is contained in:
Proddy
2023-11-26 15:56:46 +01:00
parent 1cbfc91912
commit 76901d97d2
16 changed files with 70 additions and 63 deletions

View File

@@ -22,8 +22,12 @@ const AccessPoint: FC = () => {
return (
<>
<RouterTabs value={routerTab}>
<Tab value="status" label={LL.STATUS_OF(LL.ACCESS_POINT(1))} />
<Tab value="settings" label={LL.SETTINGS_OF(LL.ACCESS_POINT(1))} disabled={!authenticatedContext.me.admin} />
<Tab value="/ap/status" label={LL.STATUS_OF(LL.ACCESS_POINT(1))} />
<Tab
value="/ap/settings"
label={LL.SETTINGS_OF(LL.ACCESS_POINT(1))}
disabled={!authenticatedContext.me.admin}
/>
</RouterTabs>
<Routes>
<Route path="status" element={<APStatusForm />} />
@@ -36,7 +40,7 @@ const AccessPoint: FC = () => {
</RequireAdmin>
}
/>
<Route path="/*" element={<Navigate replace to="status" />} />
<Route path="*" element={<Navigate replace to="/ap/status" />} />
</Routes>
</>
);