diff --git a/backend/app/routes/billing.py b/backend/app/routes/billing.py index ca049ff0..a64e3a9f 100644 --- a/backend/app/routes/billing.py +++ b/backend/app/routes/billing.py @@ -18,6 +18,13 @@ logger = logging.getLogger(__name__) billing_bp = Blueprint('billing', __name__) +@billing_bp.route('/packs', methods=['GET']) +async def get_credit_packs(): + """Public — returns available credit pack definitions for the landing page.""" + settings = await get_settings() + return jsonify({'packs': settings.get('credit_packs', [])}), 200 + + @billing_bp.route('/balance', methods=['GET']) @jwt_required() async def get_balance(): diff --git a/src/components/landing/Hero.tsx b/src/components/landing/Hero.tsx index d9832ff0..a7a17fd5 100644 --- a/src/components/landing/Hero.tsx +++ b/src/components/landing/Hero.tsx @@ -119,7 +119,7 @@ export default function Hero() { const shouldAnimate = !shouldReduce; return ( -
+
{/* Background glow */}
-
+
diff --git a/src/components/landing/Pricing.tsx b/src/components/landing/Pricing.tsx index 7ed8ea68..0469eafb 100644 --- a/src/components/landing/Pricing.tsx +++ b/src/components/landing/Pricing.tsx @@ -1,8 +1,10 @@ +import { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; import { useNavigate } from 'react-router-dom'; import { CheckCircle2, Info } from 'lucide-react'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import { fadeUp, staggerChildren, viewportOnce } from '@/lib/motion'; +import { billingApi } from '@/lib/api'; interface CreditPack { id: string; @@ -54,7 +56,13 @@ function CreditTooltip() { export default function Pricing() { const navigate = useNavigate(); - const packs = DEFAULT_PACKS; + const [packs, setPacks] = useState(DEFAULT_PACKS); + + useEffect(() => { + billingApi.getPacks() + .then(r => { if (r.data?.packs?.length) setPacks(r.data.packs); }) + .catch(() => {}); + }, []); return (
diff --git a/src/components/layout/AppLayout.tsx b/src/components/layout/AppLayout.tsx index 91027ae6..0d10f3d2 100644 --- a/src/components/layout/AppLayout.tsx +++ b/src/components/layout/AppLayout.tsx @@ -31,8 +31,11 @@ export default function AppLayout({ children }: { children?: React.ReactNode })
{/* Logo */} - - + + + + Cohorta + {/* Desktop nav */} diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx index 44c9401d..d77fb926 100644 --- a/src/components/layout/Header.tsx +++ b/src/components/layout/Header.tsx @@ -92,13 +92,13 @@ export default function Header() { : 'bg-transparent' )} > - {/* Left: Logo banner — top-anchored, overflows below the pill */} - + {/* Left: Logo banner */} + Cohorta diff --git a/src/components/layout/PublicLayout.tsx b/src/components/layout/PublicLayout.tsx index c80df0f1..20b6d8de 100644 --- a/src/components/layout/PublicLayout.tsx +++ b/src/components/layout/PublicLayout.tsx @@ -7,7 +7,7 @@ export default function PublicLayout() { return (
-
+