import React, { FC } from 'react' import useCustomer from '@framework/use-customer' import { Container, Text } from '@components/ui' interface Fields { heading: string, fullNameLabel: string, emailLabel: string, notLoggedInMessage: string } interface Props { fields: Fields } const ProfileModule:FC = ({fields}) => { const { data } = useCustomer() return ( {fields.heading} {data && (
{fields.fullNameLabel} {data.firstName} {data.lastName}
{fields.emailLabel} {data.email}
)} { !data && {fields.notLoggedInMessage} }
) } export default ProfileModule