Skip to content

Commit

Permalink
Feat: add branching logic space creation button #85
Browse files Browse the repository at this point in the history
  • Loading branch information
HOOOO98 committed Jan 12, 2024
1 parent 400f045 commit a9a61b5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/SideBar/TravelList/TravelList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@ import { TravelListProps } from "@/types/sidebar";

function TravelList({ travelList }: TravelListProps) {
const navigate = useNavigate();

const handleItemClick = () => {
if (travelList.length >= 15) {
navigate(`/mypage?full=true`);
} else {
navigate(`/carryout/1234`); //여행 스페이스 로직 연결 후 바꾸기
}
};

return (
<section className={styles.travelSpaceList}>
<button className={styles.travelSpaceList__addButton}>
<button
className={styles.travelSpaceList__addButton}
onClick={() => handleItemClick()}
>
<GoPlus className={styles.travelSpaceList__addButton__icon} />
<p className={styles.travelSpaceList__addButton__text}>
새 여행 스페이스 만들기
Expand Down

0 comments on commit a9a61b5

Please sign in to comment.