Remove /deck prefix

This commit is contained in:
Laura Hausmann
2023-10-12 19:54:26 +02:00
parent d7254bd332
commit d35cbe4473
3 changed files with 6 additions and 15 deletions

View File

@@ -21,11 +21,7 @@ browserHistory.push = (path: string, state?: MastodonLocationState) => {
state = state ?? {};
state.fromMastodon = true;
if (layoutFromWindow() === 'multi-column' && !path.startsWith('/deck')) {
originalPush(`/deck${path}`, state);
} else {
originalPush(path, state);
}
originalPush(path, state);
};
browserHistory.replace = (path: string, state?: MastodonLocationState) => {
@@ -34,11 +30,7 @@ browserHistory.replace = (path: string, state?: MastodonLocationState) => {
state.fromMastodon = true;
}
if (layoutFromWindow() === 'multi-column' && !path.startsWith('/deck')) {
originalReplace(`/deck${path}`, state);
} else {
originalReplace(path, state);
}
originalReplace(path, state);
};
export const Router: React.FC<PropsWithChildren> = ({ children }) => {