diff --git a/apps/dashboard/src/components/auth/mobile-message.tsx b/apps/dashboard/src/components/auth/mobile-message.tsx deleted file mode 100644 index 14c9d3d0b74..00000000000 --- a/apps/dashboard/src/components/auth/mobile-message.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { Smartphone } from 'lucide-react'; -import { useEffect } from 'react'; -import { post } from '@/api/api.client'; -import { showErrorToast } from '../primitives/sonner-helpers'; - -const MOBILE_WIDTH_THRESHOLD = 768; -const ONE_HOUR_MS = 60 * 60 * 1000; -const MOBILE_SETUP_STORAGE_KEY = 'mobileSetupEmailSentAt'; - -export function MobileMessage() { - useEffect(() => { - const notifyMobileSetup = async () => { - try { - const isMobile = window.innerWidth < MOBILE_WIDTH_THRESHOLD; - const lastSentAt = localStorage.getItem(MOBILE_SETUP_STORAGE_KEY); - - const now = Date.now(); - const shouldSendEmail = !lastSentAt || now - parseInt(lastSentAt) > ONE_HOUR_MS; - - if (isMobile && shouldSendEmail) { - localStorage.setItem(MOBILE_SETUP_STORAGE_KEY, now.toString()); - - await post('/support/mobile-setup', {}); - } - } catch (e) { - showErrorToast('Failed to send mobile setup email, please visit this page from Desktop.'); - } - }; - - notifyMobileSetup(); - }, []); - - return ( -
đŸ‘‹ Hey, You're Almost There!
-- We see you signed up from your mobile—nice move! But to complete the Novu setup, you'll need to switch over - to your laptop and fire up your favorite IDE. -
-- Integrating Novu into your stack means writing some actual code, setting up workflows, configuring Inbox , - and composing your first email. -
-- Check your inbox! We've sent you the setup instructions to get started. -
-- You can route notifications across channels intelligently with Novu's powerful workflows, among the channels - below. -
-{option.description}
-