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"> <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

View File

@ -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>