diff --git a/src/shared/ui/assets/css/style-fix.css b/src/shared/ui/assets/css/style-fix.css index 73b2116..6dbdab9 100644 --- a/src/shared/ui/assets/css/style-fix.css +++ b/src/shared/ui/assets/css/style-fix.css @@ -135,4 +135,7 @@ main.home-main{ } .pb-86{ padding-bottom: 86px; +} +.bottom-tabbar{ + transition: all 0.5s ease-out; } \ No newline at end of file diff --git a/src/shared/ui/menu/index.tsx b/src/shared/ui/menu/index.tsx index 426be1b..d235a01 100644 --- a/src/shared/ui/menu/index.tsx +++ b/src/shared/ui/menu/index.tsx @@ -42,18 +42,22 @@ export const Menu = ({ navigate(path); }; const onClickToMenuNavigate = (menuId: string, index: number) => { + setShortBoxOnScroll(false); + setMenuListOnScroll(false); let tops = [0, 255, 410, 565, 720, 875, 1030, 1500]; - + let lefts = [0, 85, 170, 275, 360, 450, 450, 450]; + setShortBtnIdx(index); scrollRef.current?.scrollTo({ top: tops[index], left: 0, behavior: 'smooth' }); - /* - buttonRefs.current[index]?.scrollIntoView({ + shortBtnScrollRef.current?.scrollTo({ + top: 0, + left: lefts[index], behavior: 'smooth' }); - */ + }; const onClickToMenuClose = () => { if(editMode){ @@ -101,36 +105,36 @@ export const Menu = ({ }; const shortBtnScroll = (e: any) => { - - let x = shortBtnScrollRef.current?.scrollLeft; - let top = 0; - if(x){ - if(x < 85){ - top = 0; - setShortBtnIdx(0); - } - else if(x < 170){ - top = 255; - setShortBtnIdx(1); - } - else if(x < 275){ - top = 410; - setShortBtnIdx(2); - } - else if(x < 360){ - top = 565; - setShortBtnIdx(3); - } - else if(x < 450){ - top = 720; - setShortBtnIdx(4); - } - else{ - top = 875; - setShortBtnIdx(5); - } - } if(shortBoxOnScroll){ + let x = shortBtnScrollRef.current?.scrollLeft; + let top = 0; + if(x){ + if(x < 85){ + top = 0; + setShortBtnIdx(0); + } + else if(x < 170){ + top = 255; + setShortBtnIdx(1); + } + else if(x < 275){ + top = 410; + setShortBtnIdx(2); + } + else if(x < 360){ + top = 565; + setShortBtnIdx(3); + } + else if(x < 450){ + top = 720; + setShortBtnIdx(4); + } + else{ + top = 875; + setShortBtnIdx(5); + } + } + scrollRef.current?.scrollTo({ top: top, left: 0, @@ -172,9 +176,6 @@ export const Menu = ({ behavior: 'smooth' }); } - /* - - */ }; const shortBoxTouchStart = () => { setShortBoxOnScroll(true); diff --git a/src/widgets/navigation/footer.tsx b/src/widgets/navigation/footer.tsx index 7e8a868..3653ea0 100644 --- a/src/widgets/navigation/footer.tsx +++ b/src/widgets/navigation/footer.tsx @@ -14,7 +14,7 @@ export const FooterNavigation = ({ setFavoriteEdit }: FooterProps) => { const { navigate } = useNavigate(); - const [isFooterOn, setIsFooterOn] = useState(false); + const [isFooterOn, setIsFooterOn] = useState(true); const onClickToNavigate = (path?: string) => { if(!!path){