Add magic link login for trust center
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
15
apps/trust/src/utils/pathPrefix.ts
Normal file
15
apps/trust/src/utils/pathPrefix.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user