mirror of
https://github.com/vercel/commerce.git
synced 2025-06-18 13:11:23 +00:00
Fix the body scroll when the sidebar is open
This commit is contained in:
parent
5d8f3375e8
commit
381936dc99
@ -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}
|
||||
|
@ -90,6 +90,7 @@ function uiReducer(state: State, action: Action) {
|
||||
return {
|
||||
...state,
|
||||
displayModal: true,
|
||||
displaySidebar: false,
|
||||
}
|
||||
}
|
||||
case 'CLOSE_MODAL': {
|
||||
|
Loading…
x
Reference in New Issue
Block a user