1- import { memo , useCallback , useEffect , useMemo , useState } from 'react' ;
1+ import { memo , useEffect , useMemo , useState } from 'react' ;
22import { useForm } from 'react-hook-form' ;
33import { zodResolver } from '@hookform/resolvers/zod' ;
44import { BillingLimitSchemas } from '@plunk/shared' ;
@@ -23,7 +23,7 @@ import {
2323import { AlertCircle , AlertTriangle , Check } from 'lucide-react' ;
2424import { AnimatePresence , motion } from 'framer-motion' ;
2525import type { z } from 'zod' ;
26- import { useBillingLimits , type BillingLimitsData , type CategoryLimit } from '../lib/hooks/useBillingLimits' ;
26+ import { type BillingLimitsData , type CategoryLimit , useBillingLimits } from '../lib/hooks/useBillingLimits' ;
2727import { network } from '../lib/network' ;
2828
2929// Price per email in the smallest currency unit (e.g., cents for USD/EUR)
@@ -50,7 +50,7 @@ const formatEmailCost = (emailCount: number, currency: string | null): string =>
5050 minimumFractionDigits : 2 ,
5151 maximumFractionDigits : 2 ,
5252 } ) . format ( costInCents / 100 ) ;
53- } catch ( error ) {
53+ } catch {
5454 // Fallback if currency is invalid
5555 return `${ ( costInCents / 100 ) . toFixed ( 2 ) } ${ currency . toUpperCase ( ) } ` ;
5656 }
@@ -167,8 +167,8 @@ export function BillingLimits({projectId, hasSubscription, billingEnabled}: Bill
167167 < AlertCircle className = "h-4 w-4" />
168168 < div className = "ml-2" >
169169 < p className = "text-sm" >
170- You're on the free tier with 1,000 emails per month. Upgrade to a paid subscription for
171- unlimited emails or custom limits.
170+ You're on the free tier with 1,000 emails per month. Upgrade to a paid subscription for unlimited
171+ emails or custom limits.
172172 </ p >
173173 </ div >
174174 </ Alert >
@@ -254,9 +254,7 @@ export function BillingLimits({projectId, hasSubscription, billingEnabled}: Bill
254254 </ FormControl >
255255 < FormDescription >
256256 Maximum workflow emails per month. Leave empty for unlimited.
257- { estimatedCost && (
258- < span className = "text-neutral-500" > ≈ { estimatedCost } /month</ span >
259- ) }
257+ { estimatedCost && < span className = "text-neutral-500" > ≈ { estimatedCost } /month</ span > }
260258 </ FormDescription >
261259 < FormMessage />
262260 </ FormItem >
@@ -286,9 +284,7 @@ export function BillingLimits({projectId, hasSubscription, billingEnabled}: Bill
286284 </ FormControl >
287285 < FormDescription >
288286 Maximum campaign emails per month. Leave empty for unlimited.
289- { estimatedCost && (
290- < span className = "text-neutral-500" > ≈ { estimatedCost } /month</ span >
291- ) }
287+ { estimatedCost && < span className = "text-neutral-500" > ≈ { estimatedCost } /month</ span > }
292288 </ FormDescription >
293289 < FormMessage />
294290 </ FormItem >
@@ -318,9 +314,7 @@ export function BillingLimits({projectId, hasSubscription, billingEnabled}: Bill
318314 </ FormControl >
319315 < FormDescription >
320316 Maximum transactional emails per month. Leave empty for unlimited.
321- { estimatedCost && (
322- < span className = "text-neutral-500" > ≈ { estimatedCost } /month</ span >
323- ) }
317+ { estimatedCost && < span className = "text-neutral-500" > ≈ { estimatedCost } /month</ span > }
324318 </ FormDescription >
325319 < FormMessage />
326320 </ FormItem >
0 commit comments