diff --git a/src/api/PeopleListCall.js b/src/api/PeopleListCall.js new file mode 100644 index 0000000..8f3fb05 --- /dev/null +++ b/src/api/PeopleListCall.js @@ -0,0 +1,13 @@ +import axios from "axios"; +import { instance } from "./instanceAuth.js"; + +export const PeopleListCall = async () => { + try { + const response = await instance.get(`/api/auth/member/all`); + console.log('apicall',response); + return response; + } catch (error) { + console.error("Error fetching PeopleList:", error.message); + throw error; + } +}; \ No newline at end of file diff --git a/src/pages/chat/ChatMain.jsx b/src/pages/chat/ChatMain.jsx index 891185b..992ee5e 100644 --- a/src/pages/chat/ChatMain.jsx +++ b/src/pages/chat/ChatMain.jsx @@ -10,7 +10,7 @@ import dummyChatList from "./dummyChatData/dummyChatList"; function ChatMain() { const [chatList, setChatList] = useState([]) const [selectedChatRoom, setSelectedChatRoom] = useState(null); - const nowUser = 'user1'; + const nowUser = localStorage.getItem("username");