From f64a520b8614b3daba5aebdae4e345276c51cbf3 Mon Sep 17 00:00:00 2001 From: isra el Date: Mon, 30 Mar 2026 15:02:51 +0300 Subject: [PATCH] chore(web): update dashboard banners --- .../(components)/uneed-upvote-banner.tsx | 84 +++++++++++++++++++ web/app/(app)/dashboard/layout.tsx | 16 ++-- web/config/external-links.ts | 1 + 3 files changed, 92 insertions(+), 9 deletions(-) create mode 100644 web/app/(app)/dashboard/(components)/uneed-upvote-banner.tsx diff --git a/web/app/(app)/dashboard/(components)/uneed-upvote-banner.tsx b/web/app/(app)/dashboard/(components)/uneed-upvote-banner.tsx new file mode 100644 index 0000000..fc0dfc2 --- /dev/null +++ b/web/app/(app)/dashboard/(components)/uneed-upvote-banner.tsx @@ -0,0 +1,84 @@ +'use client' + +import { Alert, AlertDescription } from '@/components/ui/alert' +import { Button } from '@/components/ui/button' +import { ExternalLinks } from '@/config/external-links' +import { ArrowUpRight, ThumbsUp } from 'lucide-react' +import Link from 'next/link' +import { useMemo, useState } from 'react' + +type BannerVariant = { + title: string + subtitle: string + cta: string +} + +const TITLES = [ + 'Launch day: help keep textbee visible on uneed.best', + 'Help others find textbee', + 'textbee is live on uneed.best', + 'Enjoying textbee so far?', + 'Find us on uneed.best', +] as const + +const SUBTITLES = [ + 'Thanks for being here,an upvote helps us reach more developers.', + 'If you’ve found it useful, a quick upvote helps others discover it.', + 'If textbee helped you, an upvote today makes a big difference.', +] as const + +const CTA_TEXTS = [ + 'Upvote on uneed.best', + 'View on uneed.best', +] as const + +function pick(items: readonly T[]) { + return items[Math.floor(Math.random() * items.length)] +} + +export default function UneedUpvoteBanner() { + const variants = useMemo( + () => + TITLES.flatMap((title) => + SUBTITLES.map((subtitle) => ({ + title, + subtitle, + cta: pick(CTA_TEXTS), + })) + ), + [] + ) + + const [variant] = useState(() => pick(variants)) + + return ( + + +
+
+ {variant.title} +
+
+ {variant.subtitle} +
+
+ +
+ +
+
+
+ ) +} + diff --git a/web/app/(app)/dashboard/layout.tsx b/web/app/(app)/dashboard/layout.tsx index e0e6cf7..146acf7 100644 --- a/web/app/(app)/dashboard/layout.tsx +++ b/web/app/(app)/dashboard/layout.tsx @@ -3,12 +3,9 @@ import { Home, MessageSquareText, UserCircle, Users } from 'lucide-react' import Link from 'next/link' import { usePathname } from 'next/navigation' -import AccountDeletionAlert from './(components)/account-deletion-alert' -import UpgradeToProAlert from './(components)/upgrade-to-pro-alert' -import UpdateAppModal from './(components)/update-app-modal' -import UpdateAppNotificationBar from './(components)/update-app-notification-bar' +import UneedUpvoteBanner from './(components)/uneed-upvote-banner' import VerifyEmailAlert from './(components)/verify-email-alert' -import { SurveyModal } from '@/components/shared/survey-modal' +import AccountDeletionAlert from './(components)/account-deletion-alert' export default function DashboardLayout({ children, @@ -52,10 +49,11 @@ export default function DashboardLayout({ {/* Main content with left padding to account for fixed sidebar */}
- + + {/* */} - + {/* */} {/* */}
{children} @@ -94,8 +92,8 @@ export default function DashboardLayout({ {/* Bottom padding for mobile to account for the fixed navigation */}
- - + {/* */} + {/* */} ) } diff --git a/web/config/external-links.ts b/web/config/external-links.ts index 1df952f..0675bf9 100644 --- a/web/config/external-links.ts +++ b/web/config/external-links.ts @@ -5,4 +5,5 @@ export const ExternalLinks = { polar: 'https://donate.textbee.dev', twitter: 'https://x.com/textbeedotdev', linkedin: 'https://www.linkedin.com/company/textbeedotdev', + uneed: 'https://www.uneed.best/tool/textbeedev-free-and-opensource-sms-gateway', }