Skip to content

Commit

Permalink
[refactor] modify some code
Browse files Browse the repository at this point in the history
  • Loading branch information
WooHyunKing committed Sep 5, 2023
1 parent e191fa9 commit b1389b2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/components/header/Header.tsx
Expand Up @@ -54,6 +54,7 @@ const Header = () => {
<LogoutArea
onClick={() => {
setAccount({ id: "", pw: "" });
sessionStorage.removeItem("token");
navigate("/login");
}}
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/main/Main.tsx
Expand Up @@ -7,7 +7,7 @@ const Main = () => {
const navigate = useNavigate();

useEffect(() => {
if (sessionStorage.getItem("token") === undefined) {
if (sessionStorage.getItem("token") === null) {
navigate("/login");
} else {
navigate("/member-club");
Expand Down
6 changes: 1 addition & 5 deletions src/pages/member/memberClub/MemberClub.tsx
Expand Up @@ -24,19 +24,15 @@ const MemberClub = () => {
Authorization: sessionStorage.getItem("token"),
},
params: {
// jsessionId:
// "ad3Z61ERalyjP9nLDMzLaAKxTask6xWAIXltnc77MTqYCttNxjonjK0upeb3VoHI.chusa_servlet_HAKSA01",
// pharosVisitor: "000069f1018a582fc3804815ca1e002f",
meatngFg: fg,
meatngCd: cd,
// userKey: "a3591f9ae7dde4db2bcd6fc701a48407",
},
});
console.log(response);
};

useEffect(() => {
if (sessionStorage.getItem("token") === undefined) {
if (sessionStorage.getItem("token") === null) {
navigate("/login");
}

Expand Down

0 comments on commit b1389b2

Please sign in to comment.