-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from Bibumhada/feat/71-set-EndOfBottomSheet
추천 식당 리스트가 없을 경우 bottomSheet 띄우기
- Loading branch information
Showing
6 changed files
with
71 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { axiosInstance } from 'apis/base/instance'; | ||
|
||
interface RetryRoomApiParams { | ||
roomId: string; | ||
} | ||
|
||
const postRetryListRoomApi = async ({ roomId }: RetryRoomApiParams) => { | ||
const response = await axiosInstance.post(`/api/v1/retry/${roomId}`); | ||
|
||
return response.data; | ||
}; | ||
|
||
export default postRetryListRoomApi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { useMutation } from '@tanstack/react-query'; | ||
import postRetryListRoomApi from 'apis/api/postRetryListRoomApi'; | ||
|
||
export const useRetryListRoom = () => { | ||
const mutation = useMutation({ | ||
mutationFn: postRetryListRoomApi, | ||
}); | ||
return mutation; | ||
}; |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
28 changes: 28 additions & 0 deletions
28
src/components/common/modal/children/EndOfListAlertBottomSheet.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
import logo from 'assets/images/logo.svg'; | ||
import Button from 'components/common/Button/Button'; | ||
import * as S from './EndOfListAlertBottomSheet.styled'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
const EndOfListAlertBottomSheet = ({ onClickGetNewRestaurantList }: { onClickGetNewRestaurantList: React.MouseEventHandler<HTMLButtonElement> }) => { | ||
const navigate = useNavigate(); | ||
|
||
const handleToLocationPage = () => { | ||
navigate('/'); | ||
}; | ||
|
||
return ( | ||
<S.Layout> | ||
<S.Logo src={logo} alt="오늘의 메뉴 로고" /> | ||
<S.Title>오늘 준비한 메뉴 추천은 여기까지에요!</S.Title> | ||
<S.ButtonLayout> | ||
<Button onClick={handleToLocationPage}>처음으로</Button> | ||
<Button $variant="orange" onClick={onClickGetNewRestaurantList}> | ||
이어서 고르기 | ||
</Button> | ||
</S.ButtonLayout> | ||
</S.Layout> | ||
); | ||
}; | ||
|
||
export default EndOfListAlertBottomSheet; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters