From 18ca71e0170a24165bbbb4fe2b49ae4511e225c6 Mon Sep 17 00:00:00 2001 From: M Gilang Januar Date: Sun, 5 Dec 2021 19:45:41 +0700 Subject: [PATCH] hotfix: get user plan from navbar --- web/src/pages/components/Navbar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/pages/components/Navbar.tsx b/web/src/pages/components/Navbar.tsx index db9002984..02946ee8a 100644 --- a/web/src/pages/components/Navbar.tsx +++ b/web/src/pages/components/Navbar.tsx @@ -43,7 +43,7 @@ const Navbar: React.FC = ({ user, page }) => {
Bandwidth usage: { } - {user?.plan === 'premium' ? Unlimited : You can download up to {prettyBytes(Math.max(0, 1_500_000_000 - Number(usage?.usage.usage)))} until {moment(usage?.usage.expire).local().format('lll')}}> + {(user?.user?.plan || user?.plan) === 'premium' ? Unlimited : You can download up to {prettyBytes(Math.max(0, 1_500_000_000 - Number(usage?.usage.usage)))} until {moment(usage?.usage.expire).local().format('lll')}}> }