Compare commits

...

2 commits

View file

@ -32,7 +32,9 @@
let route; let route;
switch (name) { switch (name) {
case "timeline": case "timeline":
if (!get(client).user) break;
route = "/"; route = "/";
getTimeline(true);
break; break;
case "notifcations": case "notifcations":
case "explore": case "explore":
@ -66,15 +68,16 @@
<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 == "/" && $client.user}
disabled={!$client.user}>
<svelte:fragment slot="icon"> <svelte:fragment slot="icon">
<TimelineIcon/> <TimelineIcon/>
</svelte:fragment> </svelte:fragment>
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">