12 lines
240 B
TypeScript
12 lines
240 B
TypeScript
|
import type { Reroute } from '@sveltejs/kit';
|
||
|
|
||
|
const translated: Record<string, string> = {
|
||
|
'/post': '/page/1',
|
||
|
};
|
||
|
|
||
|
export const reroute: Reroute = ({ url }) => {
|
||
|
if (url.pathname in translated) {
|
||
|
return translated[url.pathname];
|
||
|
}
|
||
|
};
|