풋터
This commit is contained in:
@@ -87,4 +87,10 @@ main {
|
||||
}
|
||||
.billing-label{
|
||||
width: 85px;
|
||||
}
|
||||
.full-menu-keywords-wrap{
|
||||
padding: 1rem 1.625rem;
|
||||
}
|
||||
.full-menu-keywords{
|
||||
padding: 0;
|
||||
}
|
||||
@@ -20,7 +20,6 @@ export const Menu = ({
|
||||
favoriteEdit
|
||||
}: MenuProps) => {
|
||||
const location = useLocation();
|
||||
console.log(location)
|
||||
const { navigate } = useNavigate();
|
||||
const userInfo = useStore((state) => state.UserStore.userInfo);
|
||||
|
||||
@@ -36,8 +35,7 @@ export const Menu = ({
|
||||
|
||||
const getMenuCategory = () => {
|
||||
let rs = [];
|
||||
let shortList = [];
|
||||
for (let i=0;i<MenuItems.length;i++) {
|
||||
for(let i=0;i<MenuItems.length;i++){
|
||||
rs.push(
|
||||
<MenuCategory
|
||||
key={ `menu-category-${i}` }
|
||||
@@ -117,7 +115,7 @@ export const Menu = ({
|
||||
}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="full-menu-keywords-wrap">
|
||||
<div className="full-menu-keywords">
|
||||
{
|
||||
shortBtns.map((value, index) => (
|
||||
|
||||
@@ -96,19 +96,33 @@ export const FooterNavigation = ({
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
let previousTouch: any;
|
||||
|
||||
const handleScroll = () => {
|
||||
if(window.scrollY > window.outerHeight / 3){
|
||||
setIsFooterOn(true);
|
||||
}
|
||||
else{
|
||||
setIsFooterOn(false);
|
||||
}
|
||||
const handleTouchStart = (e: TouchEvent) => {
|
||||
const touch: Touch | undefined = e.touches[0];
|
||||
previousTouch = touch;
|
||||
};
|
||||
const handleTouchMove = (e: TouchEvent) => {
|
||||
const touch: Touch | undefined = e.touches[0];
|
||||
let movementY: number | undefined;
|
||||
if(touch && previousTouch){
|
||||
movementY = touch.pageY - previousTouch.pageY;
|
||||
if(movementY > 0){
|
||||
setIsFooterOn(false);
|
||||
}
|
||||
else{
|
||||
setIsFooterOn(true);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
window.addEventListener('scroll', handleScroll);
|
||||
|
||||
window.addEventListener('touchstart', handleTouchStart);
|
||||
window.addEventListener('touchmove', handleTouchMove);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('scroll', handleScroll);
|
||||
window.removeEventListener('touchstart', handleTouchStart);
|
||||
window.removeEventListener('touchmove', handleTouchMove);
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user