fixed nav button handler triggering on page load
This commit is contained in:
		
							parent
							
								
									e80b6e7104
								
							
						
					
					
						commit
						c92c4d819d
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -33,6 +33,7 @@ | ||||||
|         switch (name) { |         switch (name) { | ||||||
|             case "timeline": |             case "timeline": | ||||||
|                 route = "/"; |                 route = "/"; | ||||||
|  |                 getTimeline(true); | ||||||
|                 break; |                 break; | ||||||
|             case "notifcations": |             case "notifcations": | ||||||
|             case "explore": |             case "explore": | ||||||
|  | @ -66,7 +67,7 @@ | ||||||
| 
 | 
 | ||||||
|     <div id="nav-items"> |     <div id="nav-items"> | ||||||
|         <Button label="Timeline" |         <Button label="Timeline" | ||||||
|                 on:click={handle_btn("timeline")} |                 on:click={() => handle_btn("timeline")} | ||||||
|                 active={path == "/"}> |                 active={path == "/"}> | ||||||
|             <svelte:fragment slot="icon"> |             <svelte:fragment slot="icon"> | ||||||
|                 <TimelineIcon/> |                 <TimelineIcon/> | ||||||
|  | @ -74,7 +75,7 @@ | ||||||
|             Timeline |             Timeline | ||||||
|         </Button> |         </Button> | ||||||
|         <Button label="Notifications" |         <Button label="Notifications" | ||||||
|                 on:click={handle_btn("notifications")} |                 on:click={() => handle_btn("notifications")} | ||||||
|                 active={path == "/notifications"} |                 active={path == "/notifications"} | ||||||
|                 disabled> |                 disabled> | ||||||
|             <svelte:fragment slot="icon"> |             <svelte:fragment slot="icon"> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue