Skip to content

Commit

Permalink
update: 마켓 타입개선 및 바텀시트가 달라지는 이슈개선
Browse files Browse the repository at this point in the history
  • Loading branch information
JoStar33 committed Aug 14, 2024
1 parent 15e6637 commit b702102
Show file tree
Hide file tree
Showing 3 changed files with 223 additions and 122 deletions.
11 changes: 5 additions & 6 deletions src/components/layouts/Aside.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import styled from 'styled-components';
import { IoMdClose } from 'react-icons/io';
import bottomTab from '@/constants/bottomTab';
import { useNavigate } from 'react-router-dom';
import routerPath from '@/constants/routerPath';
import React from 'react';

const variants: Variants = {
Expand All @@ -26,9 +25,9 @@ interface IProps {
export default function Aside({ setIsOpenAside }: IProps) {
const navigate = useNavigate();

const handleClickMenuItem = () => {
const handleClickMenuItem = (path: string) => {
setIsOpenAside(false);
navigate(routerPath.HOME);
navigate(path);
};

return (
Expand All @@ -37,10 +36,10 @@ export default function Aside({ setIsOpenAside }: IProps) {
<IoMdClose onClick={() => setIsOpenAside(false)} size={40} fill="#ffffff" cursor="pointer" />
</div>
<div className="aside-body">
{bottomTab
{[...bottomTab]
.sort((a, b) => (a.priority > b.priority ? 1 : -1))
.map((tabElement) => (
<div className="aside-body__element" onClick={handleClickMenuItem}>
<div className="aside-body__element" onClick={() => handleClickMenuItem(tabElement.path)}>
{tabElement.title}
</div>
))}
Expand All @@ -67,7 +66,7 @@ const S = {
margin-top: 15;
display: flex;
flex-direction: column;
gap: 10px;
gap: 15px;
&__element {
width: 100%;
user-select: none;
Expand Down
Loading

0 comments on commit b702102

Please sign in to comment.