From 6620ccceaf5003458fc11a4be351a3129d5f9780 Mon Sep 17 00:00:00 2001 From: Ryan Liu Date: Thu, 15 Feb 2024 12:35:36 -0800 Subject: [PATCH] chore: remove banner (#2081) --- apps/mgmt-ui/src/components/Banner/index.tsx | 60 -------------------- apps/mgmt-ui/src/layout/Header.tsx | 4 -- 2 files changed, 64 deletions(-) delete mode 100644 apps/mgmt-ui/src/components/Banner/index.tsx diff --git a/apps/mgmt-ui/src/components/Banner/index.tsx b/apps/mgmt-ui/src/components/Banner/index.tsx deleted file mode 100644 index 2ca0e5b01..000000000 --- a/apps/mgmt-ui/src/components/Banner/index.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { useActiveApplication } from '@/hooks/useActiveApplication'; -import { theme } from '@/pages/_app'; -import { useMediaQuery } from '@mui/material'; -import { DateTime } from 'luxon'; - -export function Banner() { - const { activeApplication } = useActiveApplication(); - const isSmUp = useMediaQuery(theme.breakpoints.up('sm')); - - const createdAt = activeApplication?.createdAt ?? Date.now(); - const createdAtDate = DateTime.fromJSDate(new Date(createdAt)); - const nowDate = DateTime.fromJSDate(new Date()); - - const dateDiff = nowDate.diff(createdAtDate, ['days']).toObject(); - const daysRemaining = Math.max(0, 30 - Math.floor(dateDiff.days ?? 30)); - - return ( -
-