Skip to content

Commit

Permalink
Merge pull request #86 from Strong-Potato/85-feat-add-branching-logic…
Browse files Browse the repository at this point in the history
…-space-creation-button

Feat: add branching logic space creation button #85
  • Loading branch information
HOOOO98 authored Jan 13, 2024
2 parents 400f045 + a9a61b5 commit 895bf92
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 895bf92

Please sign in to comment.