Merge branch 'fe/develop' into fe/feat/208-segmentation-label-edit

This commit is contained in:
jhynsoo 2024-09-24 09:10:22 +09:00
commit dce85f8a01
5 changed files with 8 additions and 11 deletions

View File

@ -1,5 +1,5 @@
import api from '@/api/axiosConfig';
import { ProjectListResponse, ProjectResponse, ProjectMemberRequest, ProjectMemberResponse } from '@/types';
import { ProjectResponse, ProjectMemberRequest, ProjectMemberResponse } from '@/types';
export async function getProjectList(
workspaceId: number,
@ -8,7 +8,7 @@ export async function getProjectList(
limit: number = 50
) {
return api
.get<ProjectListResponse>(`/workspaces/${workspaceId}/projects`, {
.get<ProjectResponse[]>(`/workspaces/${workspaceId}/projects`, {
params: {
memberId,
lastProjectId,

View File

@ -19,8 +19,7 @@ export default function AdminProjectSidebar(): JSX.Element {
const { data: workspaceData } = useWorkspaceQuery(Number(workspaceId), memberId);
const workspaceTitle = workspaceData?.title || `Workspace-${workspaceId}`;
const { data: projectsResponse } = useProjectListQuery(Number(workspaceId), memberId);
const projects = projectsResponse?.workspaceResponses ?? [];
const { data: projects } = useProjectListQuery(Number(workspaceId), memberId);
const createProject = useCreateProjectQuery();

View File

@ -30,7 +30,7 @@ export default function WorkspaceLayout() {
useEffect(() => {
if (!projectListData) return;
const projects = projectListData.workspaceResponses.map(
const projects = projectListData.map(
(project): Project => ({
id: project.id,
name: project.title,

View File

@ -21,7 +21,7 @@ export default function ReviewRequest(): JSX.Element {
const profile = useAuthStore((state) => state.profile);
const memberId = profile?.id || 0;
const { data: projectList } = useProjectListQuery(Number(workspaceId), memberId);
const { data: projects } = useProjectListQuery(Number(workspaceId), memberId);
const {
register,
@ -63,8 +63,8 @@ export default function ReviewRequest(): JSX.Element {
<SelectValue placeholder="프로젝트를 선택하세요" />
</SelectTrigger>
<SelectContent>
{projectList?.workspaceResponses.length ? (
projectList.workspaceResponses.map((project) => (
{projects.length ? (
projects.map((project) => (
<SelectItem
key={project.id}
value={project.id.toString()}

View File

@ -16,7 +16,7 @@ export default function WorkspaceBrowseDetail() {
const memberId = profile?.id ?? 0;
const { data: workspaceData } = useWorkspaceQuery(workspaceId, memberId);
const { data: projectsResponse, isError } = useProjectListQuery(workspaceId, memberId);
const { data: projects, isError } = useProjectListQuery(workspaceId, memberId);
const createProject = useCreateProjectQuery();
@ -28,8 +28,6 @@ export default function WorkspaceBrowseDetail() {
});
};
const projects: ProjectResponse[] = projectsResponse?.workspaceResponses ?? [];
return (
<div className="flex h-full w-full flex-col gap-8 px-6 py-4">
<HeaderSection