From fe1d4d3f1d85f02ce388b74d3b8cccec2c8beca3 Mon Sep 17 00:00:00 2001 From: isra el Date: Sat, 15 Feb 2025 15:58:24 +0300 Subject: [PATCH] chore(web): update current plan ui --- .../(components)/account-settings.tsx | 56 ++++++++++++++++++- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/web/app/(app)/dashboard/(components)/account-settings.tsx b/web/app/(app)/dashboard/(components)/account-settings.tsx index 686717d..a493a52 100644 --- a/web/app/(app)/dashboard/(components)/account-settings.tsx +++ b/web/app/(app)/dashboard/(components)/account-settings.tsx @@ -28,6 +28,7 @@ import { Loader2, Check, Calendar, + Info, } from 'lucide-react' import { useForm } from 'react-hook-form' import { z } from 'zod' @@ -42,6 +43,7 @@ import { Textarea } from '@/components/ui/textarea' import axios from 'axios' import { useSession } from 'next-auth/react' import { Routes } from '@/config/routes' +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip' const updateProfileSchema = z.object({ name: z.string().min(1, 'Name is required'), @@ -261,15 +263,63 @@ export default function AccountSettings() {

Daily

-

{currentPlan?.dailyLimit}

+

+ {currentPlan?.dailyLimit === -1 ? 'Unlimited' : currentPlan?.dailyLimit} + {currentPlan?.dailyLimit === -1 && ( + + + + + + + + +

Unlimited (within monthly limit)

+ + + + )} +

Monthly

-

{currentPlan?.monthlyLimit}

+

+ {currentPlan?.monthlyLimit === -1 ? 'Unlimited' : currentPlan?.monthlyLimit.toLocaleString()} + {currentPlan?.monthlyLimit === -1 && ( + + + + + + + + +

Unlimited (within monthly limit)

+ + + + )} +

Bulk

-

{currentPlan?.bulkSendLimit}

+

+ {currentPlan?.bulkSendLimit === -1 ? 'Unlimited' : currentPlan?.bulkSendLimit} + {currentPlan?.bulkSendLimit === -1 && ( + + + + + + + + +

Unlimited (within monthly limit)

+ + + + )} +