Skip to content

Commit

Permalink
Chore: 2.0.2 배포 (#144)
Browse files Browse the repository at this point in the history
## Chore: 2.0.2 배포

### PR을 한 이유 🎯

- 오타 수정 및 로그인 유지

### 이슈 번호 📎

- (해결하고자 하는 이슈의 이름과 해시태그 번호를 적어주세요. 예: `이슈명 #123`)

### 변경사항 🛠

- (개발한 내용의 요약을 적어주세요. 예: "로그인 버그 수정", "새로운 기능 추가" 등)

### 특이사항 📌

- (이 PR에 대한 추가적인 정보나, 리뷰어가 주의깊게 봐야할 점 등을 적어주세요.)

### 테스트 결과 📝

- (테스트를 진행한 결과, 해당 결과에 따른 스크린샷 또는 기타 정보를 제공해주세요.)
  • Loading branch information
BeanMouse authored Mar 5, 2025
2 parents dc7ef5b + edba88e commit fa44f99
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/components/Book/Current/CurrentBook/CurrentBook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ const CurrentBook: React.FC = () => {
});
setFilteredUserData(filteredData || null);
}
} catch (error) {
console.log(`에러남:${error}`);
alert("정보를 불러올 수 없습니다");
} catch {
navigate("/login");
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Home/Activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Activity = () => {
<ImageDetail>
보드 게임, 볼링부터 롯데 월드까지
<br />
방학 중에, 방학 중에도 열리는 다양한 정기 모임
학기 중에, 방학 중에도 열리는 다양한 정기 모임
<br />
이외에도 많은 번개 모임까지
<br />
Expand Down
6 changes: 3 additions & 3 deletions src/components/navBar/navBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const NavBar: React.FC = () => {
<Link to="/contact">
<Space isActive={location.pathname === "/contact"}>문의하기</Space>
</Link>
<Link to="/login">
<Space isActive={location.pathname === "/login"}>my keun</Space>
<Link to="/book">
<Space isActive={location.pathname === "/book"}>my keun</Space>
</Link>
</div>
) : (
Expand All @@ -94,7 +94,7 @@ const NavBar: React.FC = () => {
<Link to="/contact">
<Space isActive={false}>문의하기</Space>
</Link>
<Link to="/login">
<Link to="/book">
<Space isActive={false}>my keun</Space>
</Link>
</MobileMenu>
Expand Down
6 changes: 5 additions & 1 deletion src/pages/BookPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import CurrentBook from "../components/Book/Current/CurrentBook/CurrentBook.tsx"
import ApplicationBook from "../components/Book/Application/ApplicationBook.tsx";
import MyBook from "../components/Book/My/MyBook.tsx";
import { useLocation, useNavigate } from "react-router-dom";

import { useEffect } from "react";
import Nav from "../components/Nav.tsx";
import {
ContainerStyle,
InnerContainerStyle,
} from "../components/Container.tsx";
import { getToken } from "../utils/jwt.ts";

const BookPage = () => {
const locaiton = useLocation();
Expand All @@ -22,6 +22,10 @@ const BookPage = () => {
navigate(`/book?type=${e.currentTarget.dataset.action}`);
};
useEffect(() => {
const token = getToken();
if (!token) {
navigate("/login");
}
if (!component) {
navigate("/book?type=current");
}
Expand Down

0 comments on commit fa44f99

Please sign in to comment.