-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- axios를 설치했습니다. - axios 인스턴스를 생성했습니다. - authAPI는 로그인 구현과 함께 수정하겠습니다.
- Loading branch information
1 parent
e0b1ee5
commit 2bd3e93
Showing
6 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {baseAPI} from '../utils/instance'; | ||
|
||
export const getCourseList = async (body: object) => { | ||
try { | ||
const {data} = await baseAPI.get('/schedules/search', body); | ||
return data; | ||
} catch (error) { | ||
console.log('get course list fail: ', error); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import axios from 'axios'; | ||
|
||
const baseURL = import.meta.env.VITE_BASE_URL; | ||
|
||
export const baseAPI = axios.create({ | ||
baseURL: baseURL, | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
withCredentials: true, | ||
}); | ||
|
||
// 토큰 받아오는 작업 필요 | ||
export const authAPI = axios.create({ | ||
baseURL: baseURL, | ||
headers: { | ||
// Authorization: `Bearer ${token}`, | ||
}, | ||
withCredentials: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ const GlobalStyle = createGlobalStyle` | |
} | ||
thead { | ||
position: sticky; | ||
top: 0; | ||
top: -1px; | ||
} | ||
`; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters