Files
commerce/pages/account.tsx
2021-09-30 09:27:01 +07:00

17 lines
406 B
TypeScript

import React from 'react'
import { Layout } from 'src/components/common'
import { useActiveCustomer } from 'src/components/hooks/auth'
import { AccountPage, AccountSignIn } from 'src/components/modules/account'
const Account = () => {
const { customer } = useActiveCustomer()
if (customer) {
return <AccountPage />
}
return <AccountSignIn />
}
Account.Layout = Layout
export default Account