fix(frontend): Logica fout in refactoren
This commit is contained in:
		
							parent
							
								
									588c556949
								
							
						
					
					
						commit
						a29d89cef0
					
				
					 2 changed files with 8 additions and 6 deletions
				
			
		|  | @ -5,13 +5,15 @@ | |||
|     import { computed } from "vue"; | ||||
| 
 | ||||
|     const route = useRoute(); | ||||
|     await auth.loadUser(); | ||||
| 
 | ||||
|     interface RouteMeta { | ||||
|         requiresAuth?: boolean; | ||||
|     } | ||||
| 
 | ||||
|     const showMenuBar = computed(() => (route.meta as RouteMeta).requiresAuth && auth.authState.user); | ||||
| 
 | ||||
|     auth.loadUser().catch((_error) => { | ||||
|         // TODO Could not load user! | ||||
|     }); | ||||
| </script> | ||||
| 
 | ||||
| <template> | ||||
|  |  | |||
		Reference in a new issue