File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { ReactElement } from "react" ;
2
2
3
+ import { EmailVerificationPreBuiltUI } from "supertokens-auth-react/lib/build/recipe/emailverification/prebuiltui" ;
3
4
import { EmailPasswordPreBuiltUI } from "supertokens-auth-react/recipe/emailpassword/prebuiltui" ;
4
5
import { canHandleRoute , getRoutingComponent } from "supertokens-auth-react/ui" ;
5
6
6
7
import { ErrorView } from "src/views/ErrorView" ;
7
8
9
+ const SUPERTOKEN_ROUTERS = [
10
+ EmailPasswordPreBuiltUI ,
11
+ EmailVerificationPreBuiltUI ,
12
+ ] ;
13
+
8
14
export function Router ( ) : ReactElement {
9
- if ( ! canHandleRoute ( [ EmailPasswordPreBuiltUI ] ) ) {
15
+ if ( ! canHandleRoute ( SUPERTOKEN_ROUTERS ) ) {
10
16
return (
11
17
< ErrorView message = "An unexpected error has occurred: Unable to handle route. Please contact support." />
12
18
) ;
13
19
}
14
20
15
- const component = getRoutingComponent ( [ EmailPasswordPreBuiltUI ] ) ;
21
+ const component = getRoutingComponent ( SUPERTOKEN_ROUTERS ) ;
16
22
17
23
if ( ! component ) {
18
24
return (
You can’t perform that action at this time.
0 commit comments