Skip to content

πŸ“ˆ Open source, privacy-first web analytics β€” a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Display 'running out of events' banner in header

Blue Mouse18c1bfc186df
diff --git a/web/app/components/EventsRunningOutBanner.tsx b/web/app/components/EventsRunningOutBanner.tsx
deleted file mode 100644
index d4e65ca0c..000000000
--- a/web/app/components/EventsRunningOutBanner.tsx
+++ /dev/null
@@ -1,102 +0,0 @@
-import { WarningOctagonIcon, XIcon } from '@phosphor-icons/react'
-import { memo, useMemo, useState } from 'react'
-import { useTranslation } from 'react-i18next'
-
-import { LOW_EVENTS_WARNING, SHOW_BANNER_AT_PERC } from '~/lib/constants'
-import { useAuth } from '~/providers/AuthProvider'
-import Modal from '~/ui/Modal'
-import { shouldShowLowEventsBanner } from '~/utils/auth'
-import { setCookie } from '~/utils/cookie'
-import { secondsTillNextMonth } from '~/utils/generic'
-
-const EventsRunningOutBanner = () => {
- const { t } = useTranslation('common')
- const [showMoreInfoModal, setShowMoreInfoModal] = useState(false)
- const [isBannerClosed, setIsBannerClosed] = useState(false)
-
- const { user, totalMonthlyEvents } = useAuth()
-
- const shouldShowBanner = useMemo(() => {
- if (!user || isBannerClosed) {
- return false
- }
-
- const { maxEventsCount } = user
-
- if (!totalMonthlyEvents || !maxEventsCount) {
- return false
- }
-
- return shouldShowLowEventsBanner(totalMonthlyEvents, maxEventsCount)
- }, [user, totalMonthlyEvents, isBannerClosed])
-
- const closeHandler = () => {
- setIsBannerClosed(true)
-
- const maxAge = secondsTillNextMonth() + 86400
- setCookie(LOW_EVENTS_WARNING, 1, maxAge)
- }
-
- if (!shouldShowBanner || user?.dashboardBlockReason) {
- return null
- }
-
- return (
- <>
- <div className='bg-yellow-400 dark:bg-yellow-500'>
- <div className='mx-auto max-w-7xl px-3 py-3 sm:px-6 lg:px-8'>
- <div className='flex flex-wrap items-center justify-between'>
- <div className='flex flex-1 items-center'>
- <span className='flex rounded-lg bg-yellow-600 p-2'>
- <WarningOctagonIcon
- className='h-6 w-6 text-white'
- aria-hidden='true'
- />
- </span>
- <p className='ml-3 truncate font-medium text-black'>
- <span className='md:hidden'>
- {t('dashboard.lowEventsTitle')}
- </span>
- <span className='hidden md:inline'>
- {t('dashboard.eventsXPercUsed', {
- amount: SHOW_BANNER_AT_PERC,
- })}
- </span>
- </p>
- </div>
- <div className='order-3 mt-2 w-full shrink-0 sm:order-2 sm:mt-0 sm:w-auto'>
- <button
- type='button'
- onClick={() => setShowMoreInfoModal(true)}
- className='flex cursor-pointer items-center justify-center rounded-md bg-gray-50 px-4 py-2 text-sm font-medium text-yellow-600 hover:bg-yellow-50 dark:bg-slate-900 dark:text-gray-50 dark:hover:bg-slate-700'
- >
- {t('common.learnMore')}
- </button>
- </div>
- <div className='order-2 shrink-0 sm:order-3 sm:ml-3'>
- <button
- type='button'
- onClick={closeHandler}
- className='-mr-1 flex rounded-md p-2 hover:bg-yellow-500 focus:ring-2 focus:ring-white focus:outline-hidden sm:-mr-2'
- >
- <span className='sr-only'>{t('common.close')}</span>
- <XIcon className='h-6 w-6 text-black' aria-hidden='true' />
- </button>
- </div>
- </div>
- </div>
- </div>
- <Modal
- onClose={() => setShowMoreInfoModal(false)}
- onSubmit={() => setShowMoreInfoModal(false)}
- submitText={t('common.gotIt')}
- title={t('dashboard.lowEventsTitle')}
- message={t('dashboard.lowEventsDesc')}
- type='warning'
- isOpened={showMoreInfoModal}
- />
- </>
- )
-}
-
-export default memo(EventsRunningOutBanner)
diff --git a/web/app/components/Header/banners.tsx b/web/app/components/Header/banners.tsx
new file mode 100644
index 000000000..c0b00805b
--- /dev/null
+++ b/web/app/components/Header/banners.tsx
@@ -0,0 +1,281 @@
+import { useEffect, useMemo, useState } from 'react'
+import { useTranslation } from 'react-i18next'
+import { Link } from 'react-router'
+import dayjs from 'dayjs'
+import duration from 'dayjs/plugin/duration'
+import utc from 'dayjs/plugin/utc'
+
+import { SHOW_BANNER_AT_PERC, isSelfhosted, API_URL } from '~/lib/constants'
+import { useAuth } from '~/providers/AuthProvider'
+import routes from '~/utils/routes'
+import Modal from '~/ui/Modal'
+import { shouldShowLowEventsBanner } from '~/utils/auth'
+import { DashboardBlockReason } from '~/lib/models/User'
+
+dayjs.extend(utc)
+dayjs.extend(duration)
+
+const TRIAL_STATUS_MAPPING = {
+ ENDED: 1,
+ ENDS_TODAY: 2,
+ ENDS_TOMORROW: 3,
+ ENDS_IN_X_DAYS: 4,
+}
+
+const EventsRunningOutBanner = () => {
+ const { t } = useTranslation('common')
+ const [showMoreInfoModal, setShowMoreInfoModal] = useState(false)
+
+ return (
+ <>
+ <div className='header-banner w-full bg-amber-500 text-gray-50'>
+ <div className='mx-auto max-w-7xl space-x-2 px-4 py-2 text-center text-sm sm:px-6 lg:px-8'>
+ <span className='md:hidden'>{t('dashboard.lowEventsTitle')}</span>
+ <span className='hidden md:inline'>
+ {t('dashboard.eventsXPercUsed', {
+ amount: SHOW_BANNER_AT_PERC,
+ })}
+ </span>
+ <button
+ type='button'
+ onClick={() => setShowMoreInfoModal(true)}
+ className='rounded-md bg-slate-100 px-2 py-0.5 font-medium text-gray-900'
+ >
+ {t('common.learnMore')}
+ </button>
+ </div>
+ </div>
+ <Modal
+ onClose={() => setShowMoreInfoModal(false)}
+ onSubmit={() => setShowMoreInfoModal(false)}
+ submitText={t('common.gotIt')}
+ title={t('dashboard.lowEventsTitle')}
+ message={t('dashboard.lowEventsDesc')}
+ type='warning'
+ isOpened={showMoreInfoModal}
+ />
+ </>
+ )
+}
+
+interface TrialBannerProps {
+ status: string | null
+ rawStatus: number | null
+}
+
+const TrialBanner = ({ status, rawStatus }: TrialBannerProps) => {
+ const { t } = useTranslation('common')
+
+ return (
+ <div className='header-banner w-full bg-slate-900 text-gray-100 dark:bg-slate-900/70'>
+ <div className='mx-auto max-w-7xl px-4 py-2 text-center text-sm sm:px-6 lg:px-8'>
+ <span className='font-medium'>{status}</span>
+ <span className='mx-1.5'>β€”</span>
+ <Link to={routes.billing} className='font-semibold underline'>
+ {t('header.trialBanner.pickAPlan')}
+ </Link>
+ <span className='ml-1.5'>
+ {rawStatus === TRIAL_STATUS_MAPPING.ENDED
+ ? t('header.trialBanner.keepUsingEnded')
+ : t('header.trialBanner.keepUsing')}
+ </span>
+ </div>
+ </div>
+ )
+}
+
+const DashboardLockedBanner = () => {
+ const { t } = useTranslation('common')
+ const { user } = useAuth()
+ const [showMoreInfoModal, setShowMoreInfoModal] = useState(false)
+
+ const dashboardBlockReason = user?.dashboardBlockReason
+
+ const message = useMemo(() => {
+ if (dashboardBlockReason === DashboardBlockReason.exceeding_plan_limits) {
+ return t('project.locked.descExceedingTier')
+ }
+ if (dashboardBlockReason === DashboardBlockReason.trial_ended) {
+ return t('project.locked.descTialEnded')
+ }
+ if (dashboardBlockReason === DashboardBlockReason.payment_failed) {
+ return t('project.locked.descPaymentFailed')
+ }
+ if (dashboardBlockReason === DashboardBlockReason.subscription_cancelled) {
+ return t('project.locked.descSubCancelled')
+ }
+ }, [t, dashboardBlockReason])
+
+ return (
+ <>
+ <div className='header-banner w-full bg-amber-500 text-gray-50'>
+ <div className='mx-auto max-w-7xl space-x-2 px-4 py-2 text-center text-sm sm:px-6 lg:px-8'>
+ <span>{t('dashboard.accountLocked')}</span>
+ <button
+ type='button'
+ onClick={() => setShowMoreInfoModal(true)}
+ className='rounded-md bg-slate-100 px-2 py-0.5 font-medium text-gray-900'
+ >
+ {t('common.learnMore')}
+ </button>
+ </div>
+ </div>
+ <Modal
+ onClose={() => setShowMoreInfoModal(false)}
+ closeText={t('common.close')}
+ title={t('dashboard.accountLockedTitle')}
+ message={
+ <span>
+ {message}
+ <br />
+ <br />
+ {t('project.locked.resolve')}
+ </span>
+ }
+ type='warning'
+ isOpened={showMoreInfoModal}
+ customButtons={
+ <Link
+ to={routes.billing}
+ onClick={() => setShowMoreInfoModal(false)}
+ className='inline-flex w-full justify-center rounded-md bg-indigo-600 px-4 py-2 text-base font-medium text-white transition-colors hover:bg-indigo-700 sm:ml-3 sm:w-auto sm:text-sm'
+ >
+ {t('main.goToBilling')}
+ </Link>
+ }
+ />
+ </>
+ )
+}
+
+const SelfhostedCantReachAPIBanner = () => {
+ const { t } = useTranslation('common')
+
+ return (
+ <div className='header-banner w-full bg-amber-500 text-gray-50'>
+ <div className='mx-auto max-w-7xl space-x-2 px-4 py-2 text-center text-sm sm:px-6 lg:px-8'>
+ <span>{t('ce.cantReachBackend')}</span>
+ </div>
+ </div>
+ )
+}
+
+export const BannerManager = () => {
+ const { t } = useTranslation('common')
+ const { user, isAuthenticated, totalMonthlyEvents } = useAuth()
+ const [
+ showSelfhostedCantReachAPIBanner,
+ setShowSelfhostedCantReachAPIBanner,
+ ] = useState(false)
+
+ useEffect(() => {
+ const checkApiUrl = async () => {
+ if (!isSelfhosted) {
+ return
+ }
+
+ const response = await fetch(`${API_URL}ping`)
+ if (!response.ok) {
+ setShowSelfhostedCantReachAPIBanner(true)
+ }
+ }
+
+ checkApiUrl()
+ }, [])
+
+ const [rawStatus, status] = useMemo(() => {
+ const { trialEndDate } = user || {}
+
+ if (!trialEndDate) {
+ return [null, null]
+ }
+
+ const now = dayjs.utc()
+ const future = dayjs.utc(trialEndDate)
+ const diff = future.diff(now)
+
+ if (diff < 0) {
+ // trial has already ended
+ return [TRIAL_STATUS_MAPPING.ENDED, t('header.trialBanner.ended')]
+ }
+
+ if (diff < dayjs.duration(1, 'day').asMilliseconds()) {
+ // trial ends today or tomorrow
+ const isToday = future.isSame(now, 'day')
+ const isTomorrow = future.isSame(now.add(1, 'day'), 'day')
+
+ if (isToday) {
+ return [
+ TRIAL_STATUS_MAPPING.ENDS_TODAY,
+ t('header.trialBanner.endsToday'),
+ ]
+ }
+ if (isTomorrow) {
+ return [
+ TRIAL_STATUS_MAPPING.ENDS_TOMORROW,
+ t('header.trialBanner.endsTomorrow'),
+ ]
+ }
+ }
+
+ // trial ends in more than 1 day
+ const amount = Math.round(dayjs.duration(diff).asDays())
+ return [
+ TRIAL_STATUS_MAPPING.ENDS_IN_X_DAYS,
+ t('header.trialBanner.youHaveXDaysLeft', { amount }),
+ ]
+ }, [user, t])
+
+ const trialBannerHidden = useMemo(() => {
+ return (
+ !status || isSelfhosted || !isAuthenticated || user?.planCode !== 'trial'
+ )
+ }, [status, isAuthenticated, user?.planCode])
+
+ const isExpiredTrialWithoutSubscription = useMemo(() => {
+ return (
+ user?.dashboardBlockReason ===
+ DashboardBlockReason.subscription_cancelled &&
+ user?.planCode === 'none' &&
+ !!user?.trialEndDate &&
+ !user?.subID
+ )
+ }, [
+ user?.dashboardBlockReason,
+ user?.planCode,
+ user?.trialEndDate,
+ user?.subID,
+ ])
+
+ const shouldShowEventsRunningOutBanner = useMemo(() => {
+ if (!user) {
+ return false
+ }
+
+ const { maxEventsCount } = user
+
+ if (!totalMonthlyEvents || !maxEventsCount) {
+ return false
+ }
+
+ return shouldShowLowEventsBanner(totalMonthlyEvents, maxEventsCount)
+ }, [user, totalMonthlyEvents])
+
+ if (showSelfhostedCantReachAPIBanner) {
+ return <SelfhostedCantReachAPIBanner />
+ }
+
+ if (!trialBannerHidden || (isExpiredTrialWithoutSubscription && status)) {
+ return <TrialBanner status={status} rawStatus={rawStatus} />
+ }
+
+ if (user?.dashboardBlockReason) {
+ return <DashboardLockedBanner />
+ }
+
+ if (shouldShowEventsRunningOutBanner) {
+ return <EventsRunningOutBanner />
+ }
+
+ return null
+}
diff --git a/web/app/components/Header/index.tsx b/web/app/components/Header/index.tsx
index 78d16bff9..5918ab09f 100644
--- a/web/app/components/Header/index.tsx
+++ b/web/app/components/Header/index.tsx
@@ -15,9 +15,6 @@ import {
PopoverBackdrop,
} from '@headlessui/react'
import cx from 'clsx'
-import dayjs from 'dayjs'
-import duration from 'dayjs/plugin/duration'
-import utc from 'dayjs/plugin/utc'
import { type t as i18nextT } from 'i18next'
import _map from 'lodash/map'
import _startsWith from 'lodash/startsWith'
@@ -47,7 +44,7 @@ import {
TagIcon,
BookOpenIcon,
} from '@phosphor-icons/react'
-import { memo, Fragment, useMemo, useState, useEffect } from 'react'
+import { memo, Fragment, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Link } from 'react-router'
@@ -61,29 +58,17 @@ import {
DISCORD_URL,
GITHUB_URL,
isDisableMarketingPages,
- API_URL,
} from '~/lib/constants'
-import { DashboardBlockReason } from '~/lib/models/User'
import { useAuth } from '~/providers/AuthProvider'
import { useTheme } from '~/providers/ThemeProvider'
import Flag from '~/ui/Flag'
import SwetrixLogo from '~/ui/icons/SwetrixLogo'
-import Modal from '~/ui/Modal'
import routes from '~/utils/routes'
import { cn } from '~/utils/generic'
+import { BannerManager } from './banners'
const CONTACT_US_URL = `https://swetrix.com${routes.contact}`
-dayjs.extend(utc)
-dayjs.extend(duration)
-
-const TRIAL_STATUS_MAPPING = {
- ENDED: 1,
- ENDS_TODAY: 2,
- ENDS_TOMORROW: 3,
- ENDS_IN_X_DAYS: 4,
-}
-
const getSolutions = (t: typeof i18nextT) => [
{
name: t('header.solutions.analytics.title'),
@@ -478,210 +463,6 @@ const CommunityLinks = () => {
)
}
-interface TrialBannerProps {
- status: string | null
- rawStatus: number | null
-}
-
-const TrialBanner = ({ status, rawStatus }: TrialBannerProps) => {
- const { t } = useTranslation('common')
-
- return (
- <div className='header-banner w-full bg-slate-900 text-gray-100 dark:bg-slate-900/70'>
- <div className='mx-auto max-w-7xl px-4 py-2 text-center text-sm sm:px-6 lg:px-8'>
- <span className='font-medium'>{status}</span>
- <span className='mx-1.5'>β€”</span>
- <Link to={routes.billing} className='font-semibold underline'>
- {t('header.trialBanner.pickAPlan')}
- </Link>
- <span className='ml-1.5'>
- {rawStatus === TRIAL_STATUS_MAPPING.ENDED
- ? t('header.trialBanner.keepUsingEnded')
- : t('header.trialBanner.keepUsing')}
- </span>
- </div>
- </div>
- )
-}
-
-const DashboardLockedBanner = () => {
- const { t } = useTranslation('common')
- const { user } = useAuth()
- const [showMoreInfoModal, setShowMoreInfoModal] = useState(false)
-
- const dashboardBlockReason = user?.dashboardBlockReason
-
- const message = useMemo(() => {
- if (dashboardBlockReason === DashboardBlockReason.exceeding_plan_limits) {
- return t('project.locked.descExceedingTier')
- }
- if (dashboardBlockReason === DashboardBlockReason.trial_ended) {
- return t('project.locked.descTialEnded')
- }
- if (dashboardBlockReason === DashboardBlockReason.payment_failed) {
- return t('project.locked.descPaymentFailed')
- }
- if (dashboardBlockReason === DashboardBlockReason.subscription_cancelled) {
- return t('project.locked.descSubCancelled')
- }
- }, [t, dashboardBlockReason])
-
- return (
- <>
- <div className='header-banner w-full bg-amber-500 text-gray-50'>
- <div className='mx-auto max-w-7xl space-x-2 px-4 py-2 text-center text-sm sm:px-6 lg:px-8'>
- <span>{t('dashboard.accountLocked')}</span>
- <button
- type='button'
- onClick={() => setShowMoreInfoModal(true)}
- className='rounded-md bg-slate-100 px-2 py-0.5 font-medium text-gray-900'
- >
- {t('common.learnMore')}
- </button>
- </div>
- </div>
- <Modal
- onClose={() => setShowMoreInfoModal(false)}
- closeText={t('common.close')}
- title={t('dashboard.accountLockedTitle')}
- message={
- <span>
- {message}
- <br />
- <br />
- {t('project.locked.resolve')}
- </span>
- }
- type='warning'
- isOpened={showMoreInfoModal}
- customButtons={
- <Link
- to={routes.billing}
- onClick={() => setShowMoreInfoModal(false)}
- className='inline-flex w-full justify-center rounded-md bg-indigo-600 px-4 py-2 text-base font-medium text-white transition-colors hover:bg-indigo-700 sm:ml-3 sm:w-auto sm:text-sm'
- >
- {t('main.goToBilling')}
- </Link>
- }
- />
- </>
- )
-}
-
-const SelfhostedCantReachAPIBanner = () => {
- const { t } = useTranslation('common')
-
- return (
- <div className='header-banner w-full bg-amber-500 text-gray-50'>
- <div className='mx-auto max-w-7xl space-x-2 px-4 py-2 text-center text-sm sm:px-6 lg:px-8'>
- <span>{t('ce.cantReachBackend')}</span>
- </div>
- </div>
- )
-}
-
-const BannerManager = () => {
- const { t } = useTranslation('common')
- const { user, isAuthenticated } = useAuth()
- const [
- showSelfhostedCantReachAPIBanner,
- setShowSelfhostedCantReachAPIBanner,
- ] = useState(false)
-
- useEffect(() => {
- const checkApiUrl = async () => {
- if (!isSelfhosted) {
- return
- }
-
- const response = await fetch(`${API_URL}ping`)
- if (!response.ok) {
- setShowSelfhostedCantReachAPIBanner(true)
- }
- }
-
- checkApiUrl()
- }, [])
-
- const [rawStatus, status] = useMemo(() => {
- const { trialEndDate } = user || {}
-
- if (!trialEndDate) {
- return [null, null]
- }
-
- const now = dayjs.utc()
- const future = dayjs.utc(trialEndDate)
- const diff = future.diff(now)
-
- if (diff < 0) {
- // trial has already ended
- return [TRIAL_STATUS_MAPPING.ENDED, t('header.trialBanner.ended')]
- }
-
- if (diff < dayjs.duration(1, 'day').asMilliseconds()) {
- // trial ends today or tomorrow
- const isToday = future.isSame(now, 'day')
- const isTomorrow = future.isSame(now.add(1, 'day'), 'day')
-
- if (isToday) {
- return [
- TRIAL_STATUS_MAPPING.ENDS_TODAY,
- t('header.trialBanner.endsToday'),
- ]
- }
- if (isTomorrow) {
- return [
- TRIAL_STATUS_MAPPING.ENDS_TOMORROW,
- t('header.trialBanner.endsTomorrow'),
- ]
- }
- }
-
- // trial ends in more than 1 day
- const amount = Math.round(dayjs.duration(diff).asDays())
- return [
- TRIAL_STATUS_MAPPING.ENDS_IN_X_DAYS,
- t('header.trialBanner.youHaveXDaysLeft', { amount }),
- ]
- }, [user, t])
-
- const trialBannerHidden = useMemo(() => {
- return (
- !status || isSelfhosted || !isAuthenticated || user?.planCode !== 'trial'
- )
- }, [status, isAuthenticated, user?.planCode])
-
- const isExpiredTrialWithoutSubscription = useMemo(() => {
- return (
- user?.dashboardBlockReason ===
- DashboardBlockReason.subscription_cancelled &&
- user?.planCode === 'none' &&
- !!user?.trialEndDate &&
- !user?.subID
- )
- }, [
- user?.dashboardBlockReason,
- user?.planCode,
- user?.trialEndDate,
- user?.subID,
- ])
-
- if (showSelfhostedCantReachAPIBanner) {
- return <SelfhostedCantReachAPIBanner />
- }
-
- if (!trialBannerHidden || (isExpiredTrialWithoutSubscription && status)) {
- return <TrialBanner status={status} rawStatus={rawStatus} />
- }
-
- if (user?.dashboardBlockReason) {
- return <DashboardLockedBanner />
- }
-
- return null
-}
-
const AuthedHeader = ({
logoutHandler,
colourBackground,
diff --git a/web/app/pages/Dashboard/Dashboard.tsx b/web/app/pages/Dashboard/Dashboard.tsx
index 69d5c2504..d91f045be 100644
--- a/web/app/pages/Dashboard/Dashboard.tsx
+++ b/web/app/pages/Dashboard/Dashboard.tsx
@@ -28,7 +28,6 @@ import {
} from 'react-router'
import { toast } from 'sonner'
-import EventsRunningOutBanner from '~/components/EventsRunningOutBanner'
import {
useLiveVisitorsProxy,
useOverallStatsProxy,
@@ -350,7 +349,6 @@ const Dashboard = () => {
return (
<>
<div className='min-h-min-footer bg-gray-50 dark:bg-slate-950'>
- <EventsRunningOutBanner />
<div className='flex flex-col'>
<div className='mx-auto w-full max-w-7xl px-4 py-6 sm:px-6 lg:px-8'>
<div className='mb-4 flex flex-wrap justify-between gap-2'>
diff --git a/web/app/pages/Organisations/Organisations.tsx b/web/app/pages/Organisations/Organisations.tsx
index fe1fb267c..51f1fbe93 100644
--- a/web/app/pages/Organisations/Organisations.tsx
+++ b/web/app/pages/Organisations/Organisations.tsx
@@ -16,7 +16,6 @@ import {
} from 'react-router'
import { toast } from 'sonner'
-import EventsRunningOutBanner from '~/components/EventsRunningOutBanner'
import useDebounce from '~/hooks/useDebounce'
import { ENTRIES_PER_PAGE_DASHBOARD } from '~/lib/constants'
import type {
@@ -175,7 +174,6 @@ const Organisations = () => {
return (
<>
<div className='min-h-min-footer bg-gray-50 dark:bg-slate-950'>
- <EventsRunningOutBanner />
<div className='flex flex-col'>
<div className='mx-auto w-full max-w-7xl px-4 py-6 sm:px-6 lg:px-8'>
<div className='mb-6 flex flex-wrap justify-between gap-2'>
diff --git a/web/app/pages/Project/View/ViewProject.tsx b/web/app/pages/Project/View/ViewProject.tsx
index 8dda6497e..cb81011d9 100644
--- a/web/app/pages/Project/View/ViewProject.tsx
+++ b/web/app/pages/Project/View/ViewProject.tsx
@@ -44,7 +44,6 @@ import {
import { ClientOnly } from 'remix-utils/client-only'
import { toast } from 'sonner'
-import EventsRunningOutBanner from '~/components/EventsRunningOutBanner'
import Footer from '~/components/Footer'
import Header from '~/components/Header'
import useSize from '~/hooks/useSize'
@@ -1496,7 +1495,6 @@ const ViewProjectContent = () => {
)}
ref={dashboardRef}
>
- <EventsRunningOutBanner />
{!isMapFullscreen ? (
<div className='pointer-events-auto'>
<MobileSidebarTrigger
diff --git a/web/app/ui/icons/SwetrixLogo.tsx b/web/app/ui/icons/SwetrixLogo.tsx
index 510938e36..64db12361 100644
--- a/web/app/ui/icons/SwetrixLogo.tsx
+++ b/web/app/ui/icons/SwetrixLogo.tsx
@@ -27,7 +27,7 @@ const SwetrixLogo = ({ className, theme: themeOverride }: SwetrixLogoProps) => {
height='28'
width='24'
viewBox='0 0 24 28'
- aria-hidden="true"
+ aria-hidden='true'
fill='currentColor'
>
<circle cx='4' cy='22' r='3' />
diff --git a/web/public/swetrix-logo.svg b/web/public/swetrix-logo.svg
new file mode 100644
index 000000000..0b3f93245
--- /dev/null
+++ b/web/public/swetrix-logo.svg
@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="-2 0 28 28" fill="#0f172a">
+ <circle cx="4" cy="22" r="3" />
+ <circle cx="12" cy="22" r="3" />
+ <circle cx="12" cy="14" r="3" />
+ <circle cx="20" cy="14" r="3" />
+ <circle cx="12" cy="6" r="3" />
+</svg>