Skip to content

Commit

Permalink
fix(web): publish scene and story could use the same alias by mistake (
Browse files Browse the repository at this point in the history
  • Loading branch information
airslice authored Nov 13, 2024
1 parent f4e2eb1 commit c91c2d7
Show file tree
Hide file tree
Showing 24 changed files with 838 additions and 858 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 c91c2d7

Please sign in to comment.