prasi-lib/utils/router.tsx

12 lines
217 B
TypeScript
Executable File

import { router } from "app/router";
type ROUTES = keyof typeof router;
export const route_params = async <T extends ROUTES>(
route: T,
arg: ROUTES[]
) => {
const r = router[route];
if (r) {
// r()
}
};