Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: fix design feature QA #291 #294

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/Alarm/TabCapsule/Content/Content.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

&__thumbnail {
width: 4rem;
min-width: 4rem;
height: 4rem;
min-height: 4rem;
border-radius: 50%;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/SideBar/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function SideBar({isSideOpen, sideClose}: SideBarProps) {
</div>
</section>
<Divider />
<TravelList isSideOpen={isSideOpen} />
<TravelList isSideOpen={isSideOpen} sideClose={sideClose} />
</div>
</Slide>
</div>
Expand Down
11 changes: 9 additions & 2 deletions src/components/SideBar/TravelList/TravelList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {setSpaceDate} from '@/utils/formatDate';

import {TravelListProp} from '@/types/sidebar';

function TravelList({isSideOpen}: TravelListProp) {
function TravelList({isSideOpen, sideClose}: TravelListProp) {
const [, setIsFull] = useRecoilState(isFullMember);
const {mutate} = usePostSpace();
const navigate = useNavigate();
Expand All @@ -25,6 +25,7 @@ function TravelList({isSideOpen}: TravelListProp) {
onSuccess: (data) => {
if (data) {
navigate(`/trip/${data.data.id}`);
sideClose;
}
},
});
Expand All @@ -45,7 +46,13 @@ function TravelList({isSideOpen}: TravelListProp) {
<ul className={styles.travelSpaceList__items}>
{spaces.data.spaces.map((item, index) => (
<li key={index}>
<button className={styles.travelSpaceList__items__item} onClick={() => navigate(`/trip/${item.id}`)}>
<button
className={styles.travelSpaceList__items__item}
onClick={() => {
navigate(`/trip/${item.id}`);
sideClose;
}}
>
<p className={styles.travelSpaceList__items__item__name}>{item.city ? item.city : `여행지 미정`}</p>
<p className={styles.travelSpaceList__items__item__date}>
{item.startDate && item.endDate ? setSpaceDate(item.startDate, item.endDate) : '날짜 미정'}
Expand Down
1 change: 1 addition & 0 deletions src/types/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export type spaceInfo = {

export interface TravelListProp {
isSideOpen: boolean;
sideClose: () => void;
}

export type SideBarProps = {
Expand Down
Loading