disable timeline button when logged out
This commit is contained in:
		
							parent
							
								
									c92c4d819d
								
							
						
					
					
						commit
						5424772abb
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -32,6 +32,7 @@ | |||
|         let route; | ||||
|         switch (name) { | ||||
|             case "timeline": | ||||
|                 if (!get(client).user) break; | ||||
|                 route = "/"; | ||||
|                 getTimeline(true); | ||||
|                 break; | ||||
|  | @ -68,7 +69,8 @@ | |||
|     <div id="nav-items"> | ||||
|         <Button label="Timeline" | ||||
|                 on:click={() => handle_btn("timeline")} | ||||
|                 active={path == "/"}> | ||||
|                 active={path == "/" && $client.user} | ||||
|                 disabled={!$client.user}> | ||||
|             <svelte:fragment slot="icon"> | ||||
|                 <TimelineIcon/> | ||||
|             </svelte:fragment> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue