diff --git a/solution/frontend/src/pages/SitesPage.tsx b/solution/frontend/src/pages/SitesPage.tsx index 0e9a9e9..b2ad7ed 100644 --- a/solution/frontend/src/pages/SitesPage.tsx +++ b/solution/frontend/src/pages/SitesPage.tsx @@ -10,6 +10,7 @@ import { ExternalLink, Loader2, MoreHorizontal, + Newspaper, Pencil, Plus, Search, @@ -20,7 +21,7 @@ import { X, } from 'lucide-react'; import {PlaceCategory, publishUrlString, SiteStatus} from '@o2o/shared'; -import {changeStatus, PublishAction, useListMySites, type MySiteData} from '@/api'; +import {changeStatus, PublishAction, useListMySites, UserRole, type MySiteData} from '@/api'; import {AppShell, EmptyState, PageContainer} from '@/components/layout/AppShell'; import {Badge} from '@/components/ui/badge'; import {Button} from '@/components/ui/button'; @@ -28,6 +29,7 @@ import {Input} from '@/components/ui/input'; import {notify, notifyApiError} from '@/lib/notify'; import {PUBLISH_HOST} from '@/lib/site'; import {cn} from '@/lib/utils'; +import {useAuthStore} from '@/stores/auth'; // 발행본 주소는 PublishModal·CanvasView 와 같은 규칙이다 — 세 곳이 다른 주소를 말하면 안 된다. @@ -136,6 +138,7 @@ function SiteThumb({row, Icon}: {row: MySiteData; Icon: typeof Building2}) { /** 내 사이트 — 로그인한 사장님의 홈이다. */ export function SitesPage() { const navigate = useNavigate(); + const canManageBlog = (useAuthStore((s) => s.user?.role) ?? 0) >= UserRole.OWNER; const {data, isLoading, isError, error, refetch} = useListMySites({size: 50}); const [busyId, setBusyId] = useState(null); const [menuId, setMenuId] = useState(null); @@ -392,6 +395,19 @@ export function SitesPage() { 디자인·컨텐츠 관리 + {canManageBlog && ( + + )}