connection base prisma + postgres + login ok
This commit is contained in:
18
src/app/pricing/page.tsx
Normal file
18
src/app/pricing/page.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
'use client';
|
||||
|
||||
import Pricing from '@/components/Pricing';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useAuthContext } from '@/providers/AuthProvider';
|
||||
|
||||
export default function PricingPage() {
|
||||
const router = useRouter();
|
||||
const { user } = useAuthContext();
|
||||
|
||||
return (
|
||||
<Pricing
|
||||
currentPlan={user?.subscription.plan || 'free'}
|
||||
onBack={() => router.push(user ? '/dashboard' : '/')}
|
||||
onSelectPlan={() => router.push(user ? '/checkout' : '/login')}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user