diff --git a/apps/web/core/components/importers/zip-importer/steps/upload-zip/root.tsx b/apps/web/core/components/importers/zip-importer/steps/upload-zip/root.tsx index 6b95cd729f..c10a0883b3 100644 --- a/apps/web/core/components/importers/zip-importer/steps/upload-zip/root.tsx +++ b/apps/web/core/components/importers/zip-importer/steps/upload-zip/root.tsx @@ -22,9 +22,8 @@ import { CloseIcon } from "@plane/propel/icons"; import { setToast, TOAST_TYPE } from "@plane/propel/toast"; import { CircularProgressIndicator } from "@plane/ui"; // plane web hooks -import { useZipImporter, useFlag } from "@/plane-web/hooks/store"; +import { useZipImporter } from "@/plane-web/hooks/store"; import type { TZipImporterProps } from "@/types/importers/zip-importer"; -import { E_FEATURE_FLAGS } from "@plane/constants"; import { E_IMPORTER_STEPS } from "@/types/importers/zip-importer"; import { StepperNavigation } from "../../../ui"; import { UploadState } from "@/store/importers"; @@ -50,8 +49,6 @@ export const UploadZip = observer(function UploadZip({ driverType, serviceName } resetImporterData, } = useZipImporter(driverType); - const isUrlImportEnabled = useFlag(workspace?.slug ?? "", E_FEATURE_FLAGS.ZIP_IMPORTER_URL_IMPORT); - const [uploadedFile, setUploadedFile] = useState(null); const [zipUrl, setZipUrl] = useState(""); const [isConfirming, setIsConfirming] = useState(false); @@ -117,7 +114,7 @@ export const UploadZip = observer(function UploadZip({ driverType, serviceName } const handleOnClickNext = async () => { const sanitizedZipUrl = sanitizeZipUrl(zipUrl); // 1. Handle URL Import - if (isUrlImportEnabled && sanitizedZipUrl) { + if (sanitizedZipUrl) { try { setIsConfirming(true); handleImporterData(E_IMPORTER_STEPS.UPLOAD_ZIP, { @@ -186,16 +183,12 @@ export const UploadZip = observer(function UploadZip({ driverType, serviceName } } }; - // Next button is disabled if: - // - No file is uploaded - // - Upload is in progress (not complete/idle/error) - // - We're in the confirming process // Next button is disabled if: // - No file is uploaded // - Upload is in progress (not complete/idle/error) // - We're in the confirming process const isNextButtonDisabled = - (!uploadedFile && (!isUrlImportEnabled || !zipUrl)) || + (!uploadedFile && !zipUrl) || (uploadState !== UploadState.COMPLETE && uploadState !== UploadState.IDLE && uploadState !== UploadState.ERROR) || isConfirming; @@ -282,34 +275,31 @@ export const UploadZip = observer(function UploadZip({ driverType, serviceName } + <> +
+
+ {t("common.or")} +
+
- {isUrlImportEnabled && ( - <> -
-
- {t("common.or")} -
+
+

+ {t(`${driverType}_importer.upload.upload_from_url`)} +

+
+ setZipUrl(e.target.value)} + placeholder="https://example.com/export.zip" + className="flex-1 px-3 py-2 bg-surface-1 border border-subtle-1 rounded-md text-13 focus:outline-none focus:ring-2 focus:ring-accent-strong" + />
- -
-

- {t(`${driverType}_importer.upload.upload_from_url`)} -

-
- setZipUrl(e.target.value)} - placeholder="https://example.com/export.zip" - className="flex-1 px-3 py-2 bg-surface-1 border border-subtle-1 rounded-md text-13 focus:outline-none focus:ring-2 focus:ring-accent-strong" - /> -
-

- {t(`${driverType}_importer.upload.upload_from_url_description`)} -

-
- - )} +

+ {t(`${driverType}_importer.upload.upload_from_url_description`)} +

+
+ ) : (