Fix: 에러 수정
This commit is contained in:
parent
1f8e86d979
commit
51ee48f322
@ -1,4 +1,4 @@
|
||||
import { useNavigate, useParams } from 'react-router-dom';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import ProjectCard from '@/components/ProjectCard';
|
||||
import { Smile } from 'lucide-react';
|
||||
import ProjectCreateModal from '../components/ProjectCreateModal';
|
||||
@ -14,7 +14,6 @@ export default function WorkspaceBrowseDetail() {
|
||||
const workspaceId = Number(params.workspaceId);
|
||||
const { profile } = useAuthStore();
|
||||
const memberId = profile?.id ?? 0;
|
||||
const navigate = useNavigate();
|
||||
|
||||
const { data: workspaceData } = useWorkspaceQuery(workspaceId, memberId);
|
||||
const { data: projectsResponse, isError } = useProjectListQuery(workspaceId, memberId);
|
||||
@ -43,7 +42,6 @@ export default function WorkspaceBrowseDetail() {
|
||||
<ProjectList
|
||||
projects={projects}
|
||||
workspaceId={workspaceId}
|
||||
navigate={navigate}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
@ -86,15 +84,7 @@ function EmptyStateMessage({ workspaceId }: { workspaceId: number }) {
|
||||
);
|
||||
}
|
||||
|
||||
function ProjectList({
|
||||
projects,
|
||||
workspaceId,
|
||||
navigate,
|
||||
}: {
|
||||
projects: ProjectResponse[];
|
||||
workspaceId: number;
|
||||
navigate: ReturnType<typeof useNavigate>;
|
||||
}) {
|
||||
function ProjectList({ projects, workspaceId }: { projects: ProjectResponse[]; workspaceId: number }) {
|
||||
if (projects.length === 0) {
|
||||
return (
|
||||
<div className="flex h-full w-full flex-col items-center justify-center">
|
||||
|
Loading…
Reference in New Issue
Block a user