diff --git a/src/LecueNote/api/postLecueNote.ts b/src/LecueNote/api/postLecueNote.ts
index c7917164..62d81730 100644
--- a/src/LecueNote/api/postLecueNote.ts
+++ b/src/LecueNote/api/postLecueNote.ts
@@ -9,6 +9,8 @@ const postLecueNote = ({
isIconClicked,
bookId,
}: postLecueNoteProps) => {
+ const token = localStorage.getItem('token');
+
const response = api.post(
'/api/notes',
{
@@ -19,7 +21,7 @@ const postLecueNote = ({
},
{
headers: {
- Authorization: `Bearer ${import.meta.env.VITE_APP_TOKEN}`,
+ Authorization: `Bearer ${token}`,
},
},
);
diff --git a/src/Mypage/api/deleteMyBook.ts b/src/Mypage/api/deleteMyBook.ts
index d58d45e8..df898e04 100644
--- a/src/Mypage/api/deleteMyBook.ts
+++ b/src/Mypage/api/deleteMyBook.ts
@@ -1,10 +1,11 @@
import { api } from '../../libs/api';
export async function deleteMyBook(bookId: number) {
+ const token = localStorage.getItem('token');
const data = await api.delete(`/api/books/${bookId}`, {
headers: {
'Content-Type': 'application/json',
- Authorization: `Bearer ${import.meta.env.VITE_APP_TOKEN}`,
+ Authorization: `Bearer ${token}`,
},
});
diff --git a/src/Mypage/api/getMyBookList.ts b/src/Mypage/api/getMyBookList.ts
index 54bf32c6..09a063d3 100644
--- a/src/Mypage/api/getMyBookList.ts
+++ b/src/Mypage/api/getMyBookList.ts
@@ -1,10 +1,11 @@
import { api } from '../../libs/api';
export async function getMyBookList() {
+ const token = localStorage.getItem('token');
const data = await api.get(`/api/mypage/book`, {
headers: {
'Content-Type': 'application/json',
- Authorization: `Bearer ${import.meta.env.VITE_APP_TOKEN}`,
+ Authorization: `Bearer ${token}`,
},
});
return data.data.data.bookList;
diff --git a/src/Mypage/api/getMyNickName.ts b/src/Mypage/api/getMyNickName.ts
index 54f0d83a..d555ab39 100644
--- a/src/Mypage/api/getMyNickName.ts
+++ b/src/Mypage/api/getMyNickName.ts
@@ -1,10 +1,11 @@
import { api } from '../../libs/api';
export async function getMyNickName() {
+ const token = localStorage.getItem('token');
const data = await api.get(`/api/mypage/note`, {
headers: {
'Content-Type': 'application/json',
- Authorization: `Bearer ${import.meta.env.VITE_APP_TOKEN}`,
+ Authorization: `Bearer ${token}`,
},
});
return data.data.data.memberNickname;
diff --git a/src/Mypage/api/getMyNoteList.ts b/src/Mypage/api/getMyNoteList.ts
index f18e2f54..188b66a8 100644
--- a/src/Mypage/api/getMyNoteList.ts
+++ b/src/Mypage/api/getMyNoteList.ts
@@ -1,10 +1,11 @@
import { api } from '../../libs/api';
export async function getMyNoteList() {
+ const token = localStorage.getItem('token');
const data = await api.get(`/api/mypage/note`, {
headers: {
'Content-Type': 'application/json',
- Authorization: `Bearer ${import.meta.env.VITE_APP_TOKEN}`,
+ Authorization: `Bearer ${token}`,
},
});
return data.data.data.noteList;
diff --git a/src/StickerAttach/api/postStickerState.ts b/src/StickerAttach/api/postStickerState.ts
index 8423eac5..2ebbb919 100644
--- a/src/StickerAttach/api/postStickerState.ts
+++ b/src/StickerAttach/api/postStickerState.ts
@@ -7,6 +7,7 @@ export async function postStickerState({
positionX,
positionY,
}: postedStickerParams) {
+ const token = localStorage.getItem('token');
const data = await api.post(
'/api/stickers',
{
@@ -18,7 +19,7 @@ export async function postStickerState({
{
headers: {
'Content-Type': 'application/json',
- Authorization: `Bearer ${import.meta.env.VITE_APP_TOKEN}`,
+ Authorization: `Bearer ${token}`,
},
},
);
diff --git a/src/StickerPack/api/getBookUuid.ts b/src/StickerPack/api/getBookUuid.ts
index 5d16c07f..7b07aaa6 100644
--- a/src/StickerPack/api/getBookUuid.ts
+++ b/src/StickerPack/api/getBookUuid.ts
@@ -1,10 +1,11 @@
import { api } from '../../libs/api';
export async function getBookUuid(bookId: number) {
+ const token = localStorage.getItem('token');
const data = await api.get(`/api/stickers/${bookId}`, {
headers: {
'Content-Type': 'application/json',
- Authorization: `Bearer ${import.meta.env.VITE_APP_TOKEN}`,
+ Authorization: `Bearer ${token}`,
},
});
diff --git a/src/Target/page/TargetPage/index.tsx b/src/Target/page/TargetPage/index.tsx
index 6ea52f01..fbbfedf4 100644
--- a/src/Target/page/TargetPage/index.tsx
+++ b/src/Target/page/TargetPage/index.tsx
@@ -52,7 +52,7 @@ function TargetPage() {
});
};
- return isLoading || putMutation ? (
+ return isLoading ? (
) : (