disable timeline button when logged out
This commit is contained in:
parent
c92c4d819d
commit
5424772abb
|
@ -32,6 +32,7 @@
|
||||||
let route;
|
let route;
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case "timeline":
|
case "timeline":
|
||||||
|
if (!get(client).user) break;
|
||||||
route = "/";
|
route = "/";
|
||||||
getTimeline(true);
|
getTimeline(true);
|
||||||
break;
|
break;
|
||||||
|
@ -68,7 +69,8 @@
|
||||||
<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>
|
||||||
|
|
Loading…
Reference in a new issue