'use server'; import { authOptions } from 'lib/auth/config'; import { woocommerce } from 'lib/woocomerce/woocommerce'; import { getServerSession } from 'next-auth'; import { getTranslations } from 'next-intl/server'; export default async function PersonalArea() { const session = await getServerSession(authOptions); const t = await getTranslations('ProfilePage'); if (!session?.user?.customer_id) { return { status: 401, body: { error: 'User not logged' } }; } const customer = await woocommerce.get('customers', { id: session?.user.customer_id }); return (

{t('area')}

); }