import { authOptions } from 'lib/auth/config'; import { woocommerce } from 'lib/woocomerce/woocommerce'; import { getServerSession } from 'next-auth'; import { getTranslations } from 'next-intl/server'; import VendorArea from './vendor-area'; 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 user = session.user; const { first_name, last_name, email } = await woocommerce.get('customers', { id: user.customer_id }); return (

{t('area')}

{user.roles.includes('wcfm_vendor') && }
); }