Skip to content

Commit

Permalink
fix: build 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yeyounging committed Nov 3, 2024
1 parent f41fe3c commit d55de8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/api/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import axios, {
} from 'axios'
import Cookies from 'js-cookie'
import { ACCESS_TOKEN, HTTP_METHODS } from '@/constants'
import { BaseResponse, ErrorResponse } from './types'
import { BaseResponse } from './types'

const axiosInstance: AxiosInstance = axios.create({
baseURL: process.env.NEXT_PUBLIC_API_URL,
Expand All @@ -19,13 +19,13 @@ const axiosInstance: AxiosInstance = axios.create({

axiosInstance.interceptors.request.use(
async (config: InternalAxiosRequestConfig) => {
// const accessToken = Cookies.get(ACCESS_TOKEN) as string
const accessToken = process.env.NEXT_PUBLIC_MASTER_TOKEN
const accessToken = Cookies.get(ACCESS_TOKEN) as string
const accessTokenTest = process.env.NEXT_PUBLIC_MASTER_TOKEN

if (!accessToken) {
return config
}
config.headers.set('Authorization', `Bearer ${accessToken}`)
config.headers.set('Authorization', `Bearer ${accessTokenTest}`)
return config
},
(error: AxiosError) => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/home/api/queries.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useMutation, useSuspenseQuery } from '@tanstack/react-query'
import { getQuickList, postQuickStart } from './api'
import { QuickStart, QuickStartRequest } from './type'
import { QuickStartRequest } from './type'

export const useGetQuickList = () =>
useSuspenseQuery({
Expand Down

0 comments on commit d55de8c

Please sign in to comment.