Fix the body scroll when the sidebar is open (#184)

* Fix typo in the Marquee component (#176)

Co-authored-by: Hugo Lopes <hugo.lopes@present-technologies.com>

* Fix the body scroll when the sidebar is open

Co-authored-by: Hugo Lopes <hugo.lopes@present-technologies.com>
This commit is contained in:
Hugo Lopes 2021-01-29 14:26:12 +00:00 committed by GitHub
parent 505e051622
commit 42e1d9adac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -61,16 +61,16 @@ const Layout: FC<Props> = ({ children, pageProps }) => {
<main className="fit">{children}</main>
<Footer pages={pageProps.pages} />
<Sidebar open={displaySidebar} onClose={closeSidebar}>
<CartSidebarView />
</Sidebar>
<Modal open={displayModal} onClose={closeModal}>
{modalView === 'LOGIN_VIEW' && <LoginView />}
{modalView === 'SIGNUP_VIEW' && <SignUpView />}
{modalView === 'FORGOT_VIEW' && <ForgotPassword />}
</Modal>
<Sidebar open={displaySidebar} onClose={closeSidebar}>
<CartSidebarView />
</Sidebar>
<FeatureBar
title="This site uses cookies to improve your experience. By clicking, you agree to our Privacy Policy."
hide={acceptedCookies}

View File

@ -90,6 +90,7 @@ function uiReducer(state: State, action: Action) {
return {
...state,
displayModal: true,
displaySidebar: false,
}
}
case 'CLOSE_MODAL': {