Skip to content

Commit

Permalink
refactor: User 타입 수정 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
junyeokk committed Jun 8, 2024
1 parent 344d05b commit b756519
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/features/user/hooks/useUserProfile.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect } from "react";
import { fetchUserProfile } from "@/features/api/apiService";
import { fetchUserProfile } from "@/features/user/api/apiService";
import { useUserStore } from "@/features/user/model/store";

export const useUserProfile = () => {
Expand All @@ -19,7 +19,12 @@ export const useUserProfile = () => {
// setCurrentUser(null);

// 테스트를 위해 하드코딩으로 사용자 데이터 설정
setUser({ id: "1", name: "Junhyeok Chae", email: "[email protected]" });
setUser({
currentChatRoomId: null,
id: "1",
name: "Junhyeok Chae",
email: "[email protected]",
});
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/features/user/model/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export interface User {
currentChatRoomId: string;
currentChatRoomId: string | null;
id: string;
name: string;
email: string;
Expand Down

0 comments on commit b756519

Please sign in to comment.