-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 메세지리스트 컴포넌트의 자동 스크롤 기능 추가 & api 연결 테스트
- Loading branch information
1 parent
88acb88
commit 7633328
Showing
7 changed files
with
85 additions
and
39 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 @@ | ||
VITE_BASE_URL=http://13.238.194.87:3001 |
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,13 @@ | ||
import axios from "axios"; | ||
|
||
// VITE_BASE_URL로 변경하여 환경 변수 가져오기 | ||
const baseURL = import.meta.env.VITE_BASE_URL; | ||
|
||
const apiClient = axios.create({ | ||
baseURL, | ||
headers: { | ||
"Content-Type": "application/json", | ||
}, | ||
}); | ||
|
||
export default apiClient; |
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
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
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,12 @@ | ||
// src/services/userService.ts | ||
import apiClient from "@/api"; | ||
|
||
export const fetchUserData = async () => { | ||
try { | ||
const response = await apiClient.get("/user"); | ||
return response.data; | ||
} catch (error) { | ||
console.error("Error fetching user data:", error); | ||
throw error; | ||
} | ||
}; |