Latest Updates

This commit is contained in:
Bel Curcio 2021-06-05 16:48:29 -03:00
parent 3cab31332a
commit 00d1d2ac02
2 changed files with 16 additions and 18 deletions

View File

@ -124,9 +124,7 @@ const ProductView: FC<ProductViewProps> = ({ product, relatedProducts }) => {
/>
<div className="flex flex-row justify-between items-center">
<Rating value={2} />
<div className="text-accent-6 pr-1 font-medium select-none">
36 reviews
</div>
<div className="text-accent-6 pr-1 font-medium">36 reviews</div>
</div>
<div>
<Button

View File

@ -16,21 +16,21 @@ interface SidebarProps {
const Sidebar: FC<SidebarProps> = ({ children, open = false, onClose }) => {
const ref = useRef() as React.MutableRefObject<HTMLDivElement>
useEffect(() => {
setTimeout(() => {
if (ref.current && open) {
window.document.body.style.overflow = 'hidden'
disableBodyScroll(ref.current)
} else {
window.document.body.style.overflow &&
setTimeout(() => (window.document.body.style.overflow = 'unset'), 30)
!!ref.current && enableBodyScroll(ref.current)
}
}, 30)
return () => {
clearAllBodyScrollLocks()
}
}, [open])
// useEffect(() => {
// // setTimeout(() => {
// // if (ref.current && open) {
// // window.document.body.style.overflow = 'hidden'
// // disableBodyScroll(ref.current)
// // } else {
// // window.document.body.style.overflow &&
// // setTimeout(() => (window.document.body.style.overflow = 'unset'), 30)
// // !!ref.current && enableBodyScroll(ref.current)
// // }
// // }, 30)
// return () => {
// clearAllBodyScrollLocks()
// }
// }, [open])
return (
<Portal>