'use client'; import LogoutButton from 'components/button/logout'; import ShippingForm from 'components/shipping/form'; import { Customer } from 'lib/woocomerce/models/customer'; import { Shipping } from 'lib/woocomerce/models/shipping'; import Link from 'next/link'; import { useEffect, useState } from 'react'; export default function ProfilePage() { const [customer, setCustomer] = useState(undefined); const [shippingAddress, setShippingAddress] = useState(undefined); useEffect(() => { const fetchCustomer = async () => { const data = (await ( await fetch('/api/customer', { method: 'GET', headers: { 'Content-Type': 'application/json' } }) ).json()) as Customer; setCustomer(data); }; fetchCustomer(); }, []); return (

Profile

Info

{customer && (
avatar
)}
); }