File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
web-next/src/routes/(root) Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,14 @@ import { Button } from "~/components/ui/button.tsx";
2222import { useLingui } from "~/lib/i18n/macro.d.ts" ;
2323import type { authorizeInteractionPageQuery } from "./__generated__/authorizeInteractionPageQuery.graphql.ts" ;
2424
25+ function stripAcctPrefix ( uri : string ) : string {
26+ return uri . replace ( / ^ a c c t : / i, "" ) ;
27+ }
28+
2529export const route = {
2630 preload ( args ) {
27- const uri = new URLSearchParams ( args . location . search ) . get ( "uri" ) ?? "" ;
31+ const raw = new URLSearchParams ( args . location . search ) . get ( "uri" ) ?? "" ;
32+ const uri = stripAcctPrefix ( raw ) ;
2833 if ( uri ) {
2934 void loadPageQuery ( uri ) ;
3035 }
@@ -66,7 +71,10 @@ const loadPageQuery = query(
6671export default function AuthorizeInteractionPage ( ) {
6772 const { t } = useLingui ( ) ;
6873 const [ searchParams ] = useSearchParams ( ) ;
69- const uri = ( ) => searchParams . uri as string | undefined ;
74+ const uri = ( ) => {
75+ const raw = searchParams . uri as string | undefined ;
76+ return raw ? stripAcctPrefix ( raw ) : undefined ;
77+ } ;
7078
7179 return (
7280 < div class = "p-4" >
You can’t perform that action at this time.
0 commit comments