Skip to content

Commit

Permalink
Merge pull request #91 from kakao-tech-campus-2nd-step3/Evaluation
Browse files Browse the repository at this point in the history
마스터 병합
  • Loading branch information
minji2219 authored Nov 15, 2024
2 parents 841859c + 56419c6 commit ab58e6d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## 배포 링크

✅FE: https://team14-fe.vercel.app/
✅FE: [https://team14-fe.vercel.app/ ](https://team14-fe-livid.vercel.app/)
✅BE: https://order-together.duckdns.org/api/v1

## 주요기능
Expand Down Expand Up @@ -85,3 +85,8 @@
![alt text](image-8.png)

</details>

<details>
<summary>결제페이지</summary>
<img width="1277" alt="image" src="https://github.com/user-attachments/assets/8bafcb32-3cc0-433f-a1b3-b9b976a60c5e">
</details>
2 changes: 1 addition & 1 deletion src/components/spot/RecruitDialog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const RecruitDialog = ({
onRequestError();
},
};
// console.log(orderId);

if (modify) {
//@ts-ignore
putMutate({ ...requestData, id: Number(orderId) }, requestOptions);
Expand Down
24 changes: 18 additions & 6 deletions src/pages/LoginPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,32 @@ const LoginPage: React.FC = () => {
},
maxRedirects: 0,
})
//@ts-ignore
.then((response) => response.json())
.then((data) => {
if (data.redirectURL) {
window.location.href = data.redirectURL;
.then((response) => {
if (response.status === 302) {
window.location.href = response.data.redirectURL;
}
const accessToken = data.data.token;
const accessToken = response.data.data.token;
if (accessToken) {
Cookies.set('access_token', accessToken);
setIsLoggedIn(true);

navigate(RouterPath.root);
navigate(0);
}
})
.catch((error) => {
if (error.response) {
if (error.response.status === 404) {
const redirectUrl = error.request.responseURL;
if (redirectUrl) {
window.location.href = redirectUrl;
}
} else {
navigate(RouterPath.root);
}
} else {
navigate(RouterPath.root);
}
});
}
}, [location.search, isCodeProcessed, setIsLoggedIn]);
Expand Down
1 change: 0 additions & 1 deletion src/pages/OrderHistoryPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const OrderHistoryPage = () => {
const VIEW_PAGE_COUNT = 5;
const [currentPage, setCurrentPage] = useState(1);
const { refetch, data } = useGetOrderList(currentPage);
console.log(data);

const pageNumbers = Array.from(
{ length: data?.totalPages || 0 },
Expand Down

0 comments on commit ab58e6d

Please sign in to comment.