Skip to content

Commit

Permalink
fix: refactor publish
Browse files Browse the repository at this point in the history
  • Loading branch information
airslice committed Nov 11, 2024
1 parent cb0fe8d commit a790bc9
Show file tree
Hide file tree
Showing 22 changed files with 858 additions and 833 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import {
useStorytellingFetcher,
useProjectFetcher
} from "@reearth/services/api";
import { toPublishmentStatus } from "@reearth/services/api/publishTypes";
import { useT } from "@reearth/services/i18n";
import { MouseEvent, useCallback, useEffect, useMemo, useState } from "react";

import { Project as ProjectType } from "../../../type";
import { toPublishmentStatus } from "../hooks";

type Props = {
project: ProjectType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { useApolloClient } from "@apollo/client";
import useLoadMore from "@reearth/beta/hooks/useLoadMore";
import { ManagerLayout } from "@reearth/beta/ui/components/ManagerBase";
import { useProjectFetcher } from "@reearth/services/api";
import { toPublishmentStatus } from "@reearth/services/api/publishTypes";
import {
ProjectSortField,
PublishmentStatus,
SortDirection,
Visualizer
} from "@reearth/services/gql";
Expand Down Expand Up @@ -303,17 +303,6 @@ export default (workspaceId?: string) => {
};
};

export const toPublishmentStatus = (s?: PublishmentStatus) => {
switch (s) {
case PublishmentStatus.Public:
return "published";
case PublishmentStatus.Limited:
return "limited";
default:
return "unpublished";
}
};

const pagination = (sort?: SortType) => {
let first, last;
let sortBy;
Expand Down
3 changes: 2 additions & 1 deletion web/src/beta/features/Dashboard/type.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IconName } from "@reearth/beta/lib/reearth-ui";
import { PublishStatus } from "@reearth/services/api/publishTypes";
import { TeamMember } from "@reearth/services/gql";
import { ProjectType } from "@reearth/types";
import { ReactNode } from "react";
Expand All @@ -7,7 +8,7 @@ export type Project = {
id: string;
name: string;
imageUrl?: string | null;
status?: "published" | "limited" | "unpublished";
status?: PublishStatus;
isArchived?: boolean;
description?: string;
sceneId?: string;
Expand Down

This file was deleted.

Loading

0 comments on commit a790bc9

Please sign in to comment.