🎨 restyle: Layout for Account Page

This commit is contained in:
sonnguyenkieio
2021-09-16 15:04:11 +07:00
parent 1b311a69a2
commit bb5aec7dba
2 changed files with 6 additions and 10 deletions

View File

@@ -8,11 +8,6 @@
max-width: min( 100%, 1536px);
margin: auto;
}
.bgForAccount {
flex: 1;
width: 100%;
margin: auto;
}
}
.filter{
@screen xl {

View File

@@ -2,7 +2,7 @@ import { CommerceProvider } from '@framework'
import { useRouter } from 'next/router'
import { FC } from 'react'
import { useModalCommon } from 'src/components/hooks'
import { BRAND, CATEGORY, FEATURED } from 'src/utils/constanst.utils'
import { BRAND, CATEGORY, FEATURED, ROUTE } from 'src/utils/constanst.utils'
import { ScrollToTop } from '..'
import Footer from '../Footer/Footer'
import Header from '../Header/Header'
@@ -33,10 +33,11 @@ const Layout: FC<Props> = ({ children }) => {
<CommerceProvider locale={locale}>
<div className={s.mainLayout}>
<Header toggleFilter={toggleFilter} visibleFilter={visibleFilter} />
{ router.pathname === "/account" ?
<section className={s.bgForAccount}>{children}</section> :
<main>{children}</main> }
{/* <main>{children}</main> */}
{
router.pathname === ROUTE.ACCOUNT ?
<section>{children}</section> :
<main>{children}</main>
}
<div className={s.filter}><MenuNavigationProductList categories={CATEGORY} brands={BRAND} featured={FEATURED} visible={visibleFilter} onClose={closeFilter} /> </div>
<ScrollToTop visibilityHeight={1500} />
<Footer />