Skip to content

Commit

Permalink
Fix: access token
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtyoon committed Jun 8, 2024
1 parent 97f888c commit 03ed6ee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion src/apis/axios.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from "axios";
import Cookies from "js-cookie";

const accessToken = Cookies.get("accessToken");
const accessToken = Cookies.get("access_token");
const serverUrl = import.meta.env.VITE_APP_SERVER_URL;

export const instance = axios.create({
Expand Down
9 changes: 0 additions & 9 deletions src/components/Main/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,12 @@ import SelledHistory from "../Seller/SalesHistory";
import SellRequest from "../Seller/SalesRequest";

import * as Styled from "./style";
import Cookies from "js-cookie";
import Seller from "../Seller";

export default function Main() {
const [activeMenu, setActiveMenu] = useState("History");
const navigate = useNavigate();

useEffect(() => {
const accessToken = Cookies.get("access_token");

if (!accessToken) {
navigate("/");
}
});

const renderContent = () => {
switch (activeMenu) {
case "History":
Expand Down

0 comments on commit 03ed6ee

Please sign in to comment.