Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
reearth-app[bot] committed Jan 31, 2025
2 parents 5d0968b + 8761c46 commit 265ce30
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reearth/visualizer",
"version": "0.21.3",
"version": "0.21.4",
"repository": "https://github.com/reearth/reearth-visualizer.git",
"author": "Re:Earth contributors <[email protected]>",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ export default (
publicationStatus?: Status,
validAlias?: boolean,
validatingAlias?: boolean,
disabledExtensionIds?: string[],
onAliasValidate?: (alias: string) => void,
onPublish?: (alias: string | undefined, publicationStatus: Status) => void | Promise<void>,
) => {
const { getAccessToken } = useAuth();
const url = window.REEARTH_CONFIG?.published?.split("{}");
const extensions = window.REEARTH_CONFIG?.extensions?.publication;
const extensions = window.REEARTH_CONFIG?.extensions?.publication?.filter(
e => !disabledExtensionIds?.includes(e.id),
);

const [alias, setAlias] = useState(defaultAlias);
const [validation, setValidation] = useState<Validation>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ interface Props {
validatingAlias?: boolean;
currentLang?: string;
currentTheme?: string;
disabledExtensionIds?: string[];
onPublish?: (alias: string | undefined, publicationStatus: Status) => void | Promise<void>;
onAliasValidate?: (alias: string) => void;
onNotificationChange?: (type: NotificationType, text: string, heading?: string) => void;
Expand All @@ -38,6 +39,7 @@ const PublishSection: React.FC<Props> = ({
validatingAlias,
currentLang,
currentTheme,
disabledExtensionIds,
onPublish,
onAliasValidate,
onNotificationChange,
Expand All @@ -64,6 +66,7 @@ const PublishSection: React.FC<Props> = ({
publicationStatus,
validAlias,
validatingAlias,
disabledExtensionIds,
onAliasValidate,
onPublish,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { useT } from "@reearth/services/i18n";

import useHooks from "./hooks";

const DISABLED_EXTENSION_IDS = ["custom-story-domain"];

type Props = {
projectId: string;
};
Expand Down Expand Up @@ -76,6 +78,7 @@ const Public: React.FC<Props> = ({ projectId }) => {
validatingAlias={validatingAlias}
currentLang={currentLang}
currentTheme={currentTheme}
disabledExtensionIds={DISABLED_EXTENSION_IDS}
onPublish={publishProject}
onAliasValidate={checkProjectAlias}
onNotificationChange={handleNotificationChange}
Expand Down

0 comments on commit 265ce30

Please sign in to comment.