Files
probo/apps/trust/src/utils/pathPrefix.ts
Émile Ré 8b3bda56e6 Add magic link login for trust center
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-01-17 12:34:24 -08:00

16 lines
302 B
TypeScript

import { matchPath } from "react-router";
export function getPathPrefix() {
const match = matchPath(
{ path: "/trust/:id", caseSensitive: false, end: false },
window.location.pathname,
);
let prefix = "";
if (match) {
prefix = `/trust/${match.params.id}`;
}
return prefix;
}