summaryrefslogtreecommitdiffhomepage
path: root/desktop/packages/mullvad-vpn/src/renderer/lib/routeHelpers.ts
blob: 3f9c95f7a4fb20d330754ff16039e635a9be7345 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import { generatePath } from 'react-router';

import { RoutePath } from '../../shared/routes';

export type GeneratedRoutePath = { routePath: string };

export function generateRoutePath(
  routePath: RoutePath,
  parameters: Parameters<typeof generatePath>[1],
): GeneratedRoutePath {
  return { routePath: generatePath(routePath, parameters) };
}