feat: view only layout 생성

This commit is contained in:
2025-03-17 11:11:21 +09:00
parent 6e3b9aaa37
commit 05f3e48ed6
5 changed files with 46 additions and 14 deletions
@@ -1 +1,2 @@
export * from "./client";
export * from "./user";
+5 -7
View File
@@ -1,4 +1,3 @@
import { useQuery } from "@tanstack/react-query";
import { ENDPOINT } from "../config";
import { client } from "./client";
@@ -36,10 +35,9 @@ export interface IUser {
hasPassword: boolean;
}
export const useUsersQuery = ({ userUniqId }: { userUniqId: string }) => {
return useQuery({
queryKey: [ENDPOINT.USER_SERVICE.USERS],
queryFn: () =>
client.get<IUser>(`${ENDPOINT.USER_SERVICE.USERS}/${userUniqId}`),
});
export const getUserInfo = async (userUniqId: string) => {
const response = await client.get<IUser>(
`${ENDPOINT.USER_SERVICE.USERS}/${userUniqId}`,
);
return response.data;
};