/** 검토 대기 count for the admin side menu badge. */ import { create } from 'zustand'; import { apiCall } from '../../net/api'; export const useReviewCount = create<{ n: number; refresh: () => void }>((set) => ({ n: 0, refresh: () => { apiCall<{ pending: number }>('GET', '/api/admin/reviews/count') .then((r) => set({ n: r.pending })) .catch(() => {}); }, }));