|
53 | 53 | lang = "en"; |
54 | 54 | } |
55 | 55 | I18n.changeLocale(lang); |
56 | | - if (unprotectedRoutes.some(route => window.location.pathname.indexOf(route) > -1)) { |
| 56 | + const pathname = window.location.pathname; |
| 57 | + if (unprotectedRoutes.some(route => pathname.indexOf(route) > -1)) { |
57 | 58 | loaded = true; |
58 | 59 | } else { |
59 | 60 | me() |
|
77 | 78 | }) |
78 | 79 | .catch(e => { |
79 | 80 | loaded = true; |
80 | | - $redirectPath = window.location.pathname; |
| 81 | + $redirectPath = pathname; |
81 | 82 | const urlSearchParams = new URLSearchParams(window.location.search); |
82 | 83 | const logout = urlSearchParams.get("logout"); |
83 | 84 | const afterDelete = urlSearchParams.get("delete"); |
|
334 | 335 | <Route path="/services"> |
335 | 336 | <Home bookmark="services"/> |
336 | 337 | </Route> |
337 | | - <Route path="/landing" component={Landing}/> |
| 338 | + <Route path="/landing"><Landing/></Route> |
338 | 339 | <Route path="/edit-name"> |
339 | 340 | <Home bookmark="edit-name"/> |
340 | 341 | </Route> |
|
365 | 366 | <Route path="/add-password"> |
366 | 367 | <Home bookmark="reset-password"/> |
367 | 368 | </Route> |
368 | | - <Route path="/install-app" component={InstallApp}/> |
369 | | - <Route path="/update-email" component={ConfirmUpdateEmail}/> |
370 | | - <Route path="/create-from-institution" component={CreateFromInstitution}/> |
371 | | - <Route component={NotFound}/> |
| 369 | + <Route path="/install-app"><InstallApp/></Route> |
| 370 | + <Route path="/update-email"><ConfirmUpdateEmail/></Route> |
| 371 | + <Route path="/create-from-institution"><CreateFromInstitution/></Route> |
| 372 | + <Route><NotFound/></Route> |
372 | 373 | </Router> |
373 | 374 | </div> |
374 | 375 | </div> |
|
381 | 382 | <div class="content"> |
382 | 383 | <Router url="{url}"> |
383 | 384 | {#if $config.createEduIDInstitutionEnabled} |
384 | | - <Route path="/create-from-institution" component={CreateFromInstitution}/> |
385 | | - <Route path="/create-from-institution/eppn-already-linked" component={EppnAlreadyLinked}/> |
386 | | - <Route path="/create-from-institution/attribute-missing" component={AttributeMissing}/> |
387 | | - <Route path="/create-from-institution/expired" component={Expired}/> |
| 385 | + <Route path="/create-from-institution"><CreateFromInstitution/></Route> |
| 386 | + <Route path="/create-from-institution/eppn-already-linked"><EppnAlreadyLinked/></Route> |
| 387 | + <Route path="/create-from-institution/attribute-missing"><AttributeMissing/></Route> |
| 388 | + <Route path="/create-from-institution/expired"><Expired/></Route> |
388 | 389 | <Route path="/create-from-institution/verify/:hash" let:params> |
389 | 390 | <AwaitLinkFromInstitutionMail hash="{params.hash}"/> |
390 | 391 | </Route> |
391 | 392 | <Route path="/create-from-institution/link/:hash" let:params> |
392 | 393 | <LinkFromInstitution hash="{params.hash}"/> |
393 | 394 | </Route> |
394 | 395 | {/if} |
395 | | - <Route path="/landing" component={Landing}/> |
396 | | - <Route component={NotFound}/> |
| 396 | + <Route path="/install-app"><InstallApp/></Route> |
| 397 | + <Route path="/landing"><Landing/></Route> |
| 398 | + <Route><NotFound/></Route> |
397 | 399 | </Router> |
398 | 400 | </div> |
399 | 401 | </div> |
|
0 commit comments