import { Button } from '@components/common/ui/Button.js'; import { toast } from '@components/common/ui/Sonner.js'; import { useCustomerDispatch } from '@components/frontStore/customer/CustomerContext.jsx'; import { _ } from '@evershop/evershop/lib/locale/translate/_'; import React from 'react'; /** * Account pages header: the "My account" title with a Log out button inline on * the right. Shared by the dashboard and the orders page. */ export function AccountHeader() { const { logout } = useCustomerDispatch(); const handleLogout = async () => { try { await logout(); window.location.href = '/'; } catch (error) { toast.error((error as Error)?.message || _('Logout failed')); } }; return (

{_('My account')}

); }