Settings: jump to sign in after signed out
This commit is contained in:
		
							parent
							
								
									ee31c38f32
								
							
						
					
					
						commit
						3444068fd8
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -163,7 +163,7 @@ const Settings: Component = () => {
 | 
			
		|||
      }>,
 | 
			
		||||
    () => import(`./i18n/generic.json`),
 | 
			
		||||
  );
 | 
			
		||||
  const { pop } = useNavigator();
 | 
			
		||||
  const { pop, push } = useNavigator();
 | 
			
		||||
  const settings$ = useStore($settings);
 | 
			
		||||
  const { needRefresh } = useServiceWorker();
 | 
			
		||||
  const dateFnLocale = useDateFnLocale();
 | 
			
		||||
| 
						 | 
				
			
			@ -172,6 +172,10 @@ const Settings: Component = () => {
 | 
			
		|||
 | 
			
		||||
  const doSignOut = (acct: Account) => {
 | 
			
		||||
    signOut((a) => a.site === acct.site && a.accessToken === acct.accessToken);
 | 
			
		||||
 | 
			
		||||
    if (profiles().length == 0) {
 | 
			
		||||
      push("/accounts/sign-in", { replace: "all" });
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  css`
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue