feat: 게시물 답글 버튼 권한 적용

This commit is contained in:
2025-05-13 17:03:22 +09:00
parent 8bebd0c2c3
commit 2352a395fb
8 changed files with 30 additions and 12 deletions
@@ -2,7 +2,7 @@ import { useQuery } from "@tanstack/react-query";
import { images } from "@common/assets";
import { getConfig } from "@common/config";
import { ENDPOINT } from "../../config";
import { getCookie, setCookie } from "../../lib";
import { setCookie } from "../../lib";
import { getSiteInfo, getUserInfo } from "../../api";
import {
DropdownMenu,
@@ -12,14 +12,12 @@ import {
} from "../dropdown-menu";
import { Button } from "../button";
const { AUTH_USER_ID, SITE_ID } = getConfig();
const { SITE_ID } = getConfig();
export function Header({ viewOnly }: { viewOnly?: boolean }) {
const userUniqId = getCookie(AUTH_USER_ID ?? "") ?? "";
const { data: userInfo } = useQuery({
queryKey: [ENDPOINT.USER_SERVICE.USERS],
queryFn: () => getUserInfo(userUniqId),
queryFn: () => getUserInfo(),
enabled: !viewOnly,
});