mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 07:26:59 +00:00
Latest Updates
This commit is contained in:
parent
3cab31332a
commit
00d1d2ac02
@ -124,9 +124,7 @@ const ProductView: FC<ProductViewProps> = ({ product, relatedProducts }) => {
|
|||||||
/>
|
/>
|
||||||
<div className="flex flex-row justify-between items-center">
|
<div className="flex flex-row justify-between items-center">
|
||||||
<Rating value={2} />
|
<Rating value={2} />
|
||||||
<div className="text-accent-6 pr-1 font-medium select-none">
|
<div className="text-accent-6 pr-1 font-medium">36 reviews</div>
|
||||||
36 reviews
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
|
@ -16,21 +16,21 @@ interface SidebarProps {
|
|||||||
const Sidebar: FC<SidebarProps> = ({ children, open = false, onClose }) => {
|
const Sidebar: FC<SidebarProps> = ({ children, open = false, onClose }) => {
|
||||||
const ref = useRef() as React.MutableRefObject<HTMLDivElement>
|
const ref = useRef() as React.MutableRefObject<HTMLDivElement>
|
||||||
|
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
setTimeout(() => {
|
// // setTimeout(() => {
|
||||||
if (ref.current && open) {
|
// // if (ref.current && open) {
|
||||||
window.document.body.style.overflow = 'hidden'
|
// // window.document.body.style.overflow = 'hidden'
|
||||||
disableBodyScroll(ref.current)
|
// // disableBodyScroll(ref.current)
|
||||||
} else {
|
// // } else {
|
||||||
window.document.body.style.overflow &&
|
// // window.document.body.style.overflow &&
|
||||||
setTimeout(() => (window.document.body.style.overflow = 'unset'), 30)
|
// // setTimeout(() => (window.document.body.style.overflow = 'unset'), 30)
|
||||||
!!ref.current && enableBodyScroll(ref.current)
|
// // !!ref.current && enableBodyScroll(ref.current)
|
||||||
}
|
// // }
|
||||||
}, 30)
|
// // }, 30)
|
||||||
return () => {
|
// return () => {
|
||||||
clearAllBodyScrollLocks()
|
// clearAllBodyScrollLocks()
|
||||||
}
|
// }
|
||||||
}, [open])
|
// }, [open])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Portal>
|
<Portal>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user