mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-22 00:52:43 +01:00
ui: fix DashboardRouter trailing slashes
This commit is contained in:
parent
b59e1da860
commit
e88197c4b1
@ -21,7 +21,7 @@ function DashboardRouter() {
|
||||
{routes.account
|
||||
.filter(route => route.path !== undefined)
|
||||
.map(({ path, name, end = false }) => (
|
||||
<NavLink key={path} to={`/account/${path ?? ''}`.replace('//', '/')} end={end}>
|
||||
<NavLink key={path} to={`/account/${path ?? ''}`.replace(/\/$/, '')} end={end}>
|
||||
{name}
|
||||
</NavLink>
|
||||
))}
|
||||
@ -34,7 +34,7 @@ function DashboardRouter() {
|
||||
<Route path="" element={<DashboardContainer />} />
|
||||
|
||||
{routes.account.map(({ route, component: Component }) => (
|
||||
<Route key={route} path={`/account/${route}`.replace('//', '/')} element={<Component />} />
|
||||
<Route key={route} path={`/account/${route}`.replace(/\/$/, '')} element={<Component />} />
|
||||
))}
|
||||
|
||||
<Route path="*" element={<NotFound />} />
|
||||
|
Loading…
Reference in New Issue
Block a user