aboutsummaryrefslogtreecommitdiffstats
path: root/ui/src/pages/Home.tsx
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2024-05-28 16:28:09 +0100
committerGitHub <noreply@github.com>2024-05-28 16:28:09 +0100
commitb49c73de3eded0a39091b24ef638e786500a2d7b (patch)
tree1bdfa0d0ea124188e4faa1a04e6ca0eff575c961 /ui/src/pages/Home.tsx
parentfix: save sync time in daemon (#2051) (diff)
downloadatuin-b49c73de3eded0a39091b24ef638e786500a2d7b.zip
fix(ui): handle being logged out gracefully (#2052)
* fix(ui): handle being logged out gracefully * use settings.logged_in
Diffstat (limited to 'ui/src/pages/Home.tsx')
-rw-r--r--ui/src/pages/Home.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/src/pages/Home.tsx b/ui/src/pages/Home.tsx
index ce42e0b1..93f2bf93 100644
--- a/ui/src/pages/Home.tsx
+++ b/ui/src/pages/Home.tsx
@@ -68,7 +68,10 @@ export default function Home() {
stats={[
{
name: "Last Sync",
- stat: formatRelative(homeInfo.lastSyncTime, new Date()),
+ stat:
+ (homeInfo.lastSyncTime &&
+ formatRelative(homeInfo.lastSyncTime, new Date())) ||
+ "Never",
},
{
name: "Total history records",