From 70a1035cb04ae77700acfd404362199b310dd9ed Mon Sep 17 00:00:00 2001 From: Tom Quirk <12551741+tomquirk@users.noreply.github.com> Date: Tue, 19 Sep 2023 21:40:42 +0200 Subject: [PATCH] clean up new edit cycle page feature flag (#4076) --- .../pages/PayoutsPage/NewPayoutsPage.tsx | 2 +- .../ProjectSettingsContent.tsx | 14 +- .../V2V3SettingsProvider.tsx | 2 +- .../hooks/useEditingFundingCycleConfig.ts | 0 .../hooks/useFundingHasSavedChanges.ts | 0 .../hooks/useInitialEditingData.ts | 0 .../hooks/useReconfigureFundingCycle.ts | 0 .../AdvancedDropdown.tsx | 0 .../DetailsSection/CycleDeadlineDropdown.tsx | 0 .../DetailsSection/DetailsSection.tsx | 0 .../DetailsSection/DetailsSectionAdvanced.tsx | 0 .../DetailsSection/DurationFields.tsx | 0 .../DetailsSection/index.tsx | 0 .../EditCycleFormContext.tsx | 0 .../EditCycleFormFields.ts | 0 .../EditCycleFormSection.tsx | 0 .../EditCycleHeader.tsx | 0 .../EditCyclePage.tsx | 2 +- .../PayoutsSection/PayoutsSection.tsx | 0 .../PayoutsTable/HeaderRows.tsx | 0 .../PayoutsTable/PayoutSplitRow.tsx | 0 .../PayoutsTable/PayoutSplitRowMenu.tsx | 0 .../PayoutsTable/PayoutTableSettings.tsx | 0 .../PayoutsTable/PayoutTitle.tsx | 0 .../PayoutsTable/PayoutsTable.tsx | 0 .../PayoutsTable/PayoutsTableBody.tsx | 0 .../PayoutsTable/PayoutsTableCell.tsx | 0 .../PayoutsTable/PayoutsTableRow.tsx | 0 .../PayoutsSection/PayoutsTable/TotalRows.tsx | 0 .../context/PayoutsTableContext.tsx | 0 .../PayoutsSection/PayoutsTable/index.tsx | 0 .../modals/SwitchToLimitedModal.tsx | 0 .../modals/SwitchToUnlimitedModal.tsx | 0 .../PayoutsSection/hooks/usePayoutsTable.tsx | 0 .../PayoutsSection/index.tsx | 0 .../ReviewConfirmModal/DetailsSectionDiff.tsx | 0 .../ReviewConfirmModal/DiffSection.tsx | 0 .../ReviewConfirmModal/PayoutsSectionDiff.tsx | 0 .../ReviewConfirmModal/ReviewConfirmModal.tsx | 2 +- .../SectionCollapseHeader.tsx | 0 .../ReviewConfirmModal/TokensSectionDiff.tsx | 0 .../hooks/useDetailsSectionValues.ts | 0 .../hooks/usePayoutsSectionValues.ts | 0 .../hooks/useTokensSectionValues.ts | 0 .../ReviewConfirmModal/index.tsx | 0 .../IssuanceRateReductionField.tsx | 0 .../TokensSection/MintRateField.tsx | 0 .../TokensSection/RedemptionRateField.tsx | 0 .../TokensSection/ReservedTokensField.tsx | 0 .../TokensSection/TokensSection.tsx | 0 .../TokensSection/TokensSectionAdvanced.tsx | 0 .../TokensSection/index.tsx | 0 .../hooks/useEditCycleFormHasError.tsx | 0 .../hooks/useLoadEditCycleData.tsx | 2 +- .../hooks/usePrepareSaveEditCycleData.tsx | 2 +- .../hooks/useLaunchNftsForm.ts | 4 +- .../LaunchFundingCycleForm.tsx | 6 +- .../NftSummarySection.tsx | 0 .../ReconfigurePreview.tsx | 0 .../SetNftOperatorPermissionsButton.tsx | 0 .../UpgradeFundingCycle.tsx | 2 +- .../hooks/useLaunchFundingCycles.ts | 2 +- .../hooks/useLaunchFundingCyclesData.ts | 2 +- .../hooks/useLaunchNftFundingCycle.ts | 2 +- .../hooks/useLaunchStandardFundingCycle.ts | 2 +- .../DeployConfigurationButton.tsx | 29 -- .../ReconfigureFundingCycleForm.tsx | 282 ------------------ .../ReconfigureFundingCycleSettingsPage.tsx | 26 -- .../ReconfigurePreview/index.ts | 1 - .../ReconfigureUpcomingMessage.tsx | 87 ------ .../index.ts | 1 - src/constants/featureFlags.ts | 2 - src/locales/messages.pot | 30 +- src/utils/featureFlags.ts | 5 - 74 files changed, 23 insertions(+), 486 deletions(-) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/{pages/ReconfigureFundingCycleSettingsPage => }/hooks/useEditingFundingCycleConfig.ts (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/{pages/ReconfigureFundingCycleSettingsPage => }/hooks/useFundingHasSavedChanges.ts (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/{pages/ReconfigureFundingCycleSettingsPage => }/hooks/useInitialEditingData.ts (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/{pages/ReconfigureFundingCycleSettingsPage => }/hooks/useReconfigureFundingCycle.ts (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/AdvancedDropdown.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/DetailsSection/CycleDeadlineDropdown.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/DetailsSection/DetailsSection.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/DetailsSection/DetailsSectionAdvanced.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/DetailsSection/DurationFields.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/DetailsSection/index.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/EditCycleFormContext.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/EditCycleFormFields.ts (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/EditCycleFormSection.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/EditCycleHeader.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/EditCyclePage.tsx (98%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsSection.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/HeaderRows.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/PayoutSplitRow.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/PayoutSplitRowMenu.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/PayoutTableSettings.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/PayoutTitle.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/PayoutsTable.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/PayoutsTableBody.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/PayoutsTableCell.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/PayoutsTableRow.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/TotalRows.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/context/PayoutsTableContext.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/index.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/modals/SwitchToLimitedModal.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/PayoutsTable/modals/SwitchToUnlimitedModal.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/hooks/usePayoutsTable.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/PayoutsSection/index.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/ReviewConfirmModal/DetailsSectionDiff.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/ReviewConfirmModal/DiffSection.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/ReviewConfirmModal/PayoutsSectionDiff.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/ReviewConfirmModal/ReviewConfirmModal.tsx (97%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/ReviewConfirmModal/SectionCollapseHeader.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/ReviewConfirmModal/TokensSectionDiff.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/ReviewConfirmModal/hooks/useDetailsSectionValues.ts (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/ReviewConfirmModal/hooks/usePayoutsSectionValues.ts (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/ReviewConfirmModal/hooks/useTokensSectionValues.ts (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/ReviewConfirmModal/index.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/TokensSection/IssuanceRateReductionField.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/TokensSection/MintRateField.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/TokensSection/RedemptionRateField.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/TokensSection/ReservedTokensField.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/TokensSection/TokensSection.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/TokensSection/TokensSectionAdvanced.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/TokensSection/index.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/hooks/useEditCycleFormHasError.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/hooks/useLoadEditCycleData.tsx (97%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{NewEditCyclePage => EditCyclePage}/hooks/usePrepareSaveEditCycleData.tsx (98%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{ReconfigureFundingCycleSettingsPage/ReconfigurePreview => ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle}/NftSummarySection.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{ReconfigureFundingCycleSettingsPage/ReconfigurePreview => ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle}/ReconfigurePreview.tsx (100%) rename src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/{ReconfigureFundingCycleSettingsPage => ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle}/SetNftOperatorPermissionsButton.tsx (100%) delete mode 100644 src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/DeployConfigurationButton.tsx delete mode 100644 src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigureFundingCycleForm.tsx delete mode 100644 src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigureFundingCycleSettingsPage.tsx delete mode 100644 src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigurePreview/index.ts delete mode 100644 src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigureUpcomingMessage.tsx delete mode 100644 src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/index.ts diff --git a/src/components/Create/components/pages/PayoutsPage/NewPayoutsPage.tsx b/src/components/Create/components/pages/PayoutsPage/NewPayoutsPage.tsx index 9c784206da..103111b0c4 100644 --- a/src/components/Create/components/pages/PayoutsPage/NewPayoutsPage.tsx +++ b/src/components/Create/components/pages/PayoutsPage/NewPayoutsPage.tsx @@ -1,5 +1,5 @@ import { Form } from 'antd' -import PayoutsTable from 'components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable' +import PayoutsTable from 'components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable' import { CURRENCY_METADATA, CurrencyName } from 'constants/currency' import { BigNumber } from 'ethers' import { Split } from 'models/splits' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/ProjectSettingsContent.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/ProjectSettingsContent.tsx index 03263212cd..0241ba7179 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/ProjectSettingsContent.tsx +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/ProjectSettingsContent.tsx @@ -1,27 +1,24 @@ -import * as constants from '@ethersproject/constants' import { ChevronRightIcon } from '@heroicons/react/20/solid' import { ArrowLeftIcon } from '@heroicons/react/24/outline' import { Trans, t } from '@lingui/macro' import { Button, Layout } from 'antd' import { V2V3SettingsPageKey } from 'components/v2v3/V2V3Project/V2V3ProjectSettings/ProjectSettingsDashboard' -import { FEATURE_FLAGS } from 'constants/featureFlags' import { V2V3ProjectContext } from 'contexts/v2v3/Project/V2V3ProjectContext' import Link from 'next/link' import { useContext, useMemo } from 'react' import { twJoin } from 'tailwind-merge' -import { featureFlagEnabled } from 'utils/featureFlags' +import { isZeroAddress } from 'utils/address' import { ProjectSettingsLayout } from './ProjectSettingsLayout' import { useSettingsPagePath } from './hooks/useSettingsPagePath' import { ArchiveProjectSettingsPage } from './pages/ArchiveProjectSettingsPage' +import { EditCyclePage } from './pages/EditCyclePage/EditCyclePage' import { EditNftsPage } from './pages/EditNftsPage/EditNftsPage' import { GovernanceSettingsPage } from './pages/GovernanceSettingsPage' -import { EditCyclePage } from './pages/NewEditCyclePage/EditCyclePage' import { PayoutsSettingsPage } from './pages/PayoutsSettingsPage' import { ProjectDetailsSettingsPage } from './pages/ProjectDetailsSettingsPage/ProjectDetailsSettingsPage' import { ProjectHandleSettingsPage } from './pages/ProjectHandleSettingsPage' import { ProjectNftSettingsPage } from './pages/ProjectNftSettingsPage' import { ProjectUpgradesPage } from './pages/ProjectUpgradesPage' -import { ReconfigureFundingCycleSettingsPage } from './pages/ReconfigureFundingCycleSettingsPage' import { ReservedTokensSettingsPage } from './pages/ReservedTokensSettingsPage' import { TransferOwnershipSettingsPage } from './pages/TransferOwnershipSettingsPage' import { V1V2TokenMigrationSettingsPage } from './pages/V1V2TokenMigrationSettingsPage' @@ -31,9 +28,7 @@ const SettingsPageComponents: { } = { general: ProjectDetailsSettingsPage, handle: ProjectHandleSettingsPage, - cycle: featureFlagEnabled(FEATURE_FLAGS.NEW_CYCLE_CONFIG_PAGE) - ? EditCyclePage - : ReconfigureFundingCycleSettingsPage, + cycle: EditCyclePage, nfts: EditNftsPage, payouts: PayoutsSettingsPage, reservedtokens: ReservedTokensSettingsPage, @@ -104,8 +99,7 @@ export function ProjectSettingsContent({ settingsPageKey: V2V3SettingsPageKey }) { const { fundingCycleMetadata } = useContext(V2V3ProjectContext) - const hasExistingNfts = - fundingCycleMetadata?.dataSource !== constants.AddressZero + const hasExistingNfts = !isZeroAddress(fundingCycleMetadata?.dataSource) const ActiveSettingsPage = useMemo( () => SettingsPageComponents[settingsPageKey], diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/V2V3SettingsProvider.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/V2V3SettingsProvider.tsx index 6afc06a8c4..e5046bb485 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/V2V3SettingsProvider.tsx +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/V2V3SettingsProvider.tsx @@ -4,7 +4,7 @@ import { V2V3ProjectPageProvider } from 'contexts/v2v3/V2V3ProjectPageProvider' import { useRouter } from 'next/router' import { Provider } from 'react-redux' import store from 'redux/store' -import { EditCycleFormProvider } from './pages/NewEditCyclePage/EditCycleFormContext' +import { EditCycleFormProvider } from './pages/EditCyclePage/EditCycleFormContext' export const V2V3SettingsProvider: React.FC = ({ children, diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/hooks/useEditingFundingCycleConfig.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useEditingFundingCycleConfig.ts similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/hooks/useEditingFundingCycleConfig.ts rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useEditingFundingCycleConfig.ts diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/hooks/useFundingHasSavedChanges.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useFundingHasSavedChanges.ts similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/hooks/useFundingHasSavedChanges.ts rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useFundingHasSavedChanges.ts diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/hooks/useInitialEditingData.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useInitialEditingData.ts similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/hooks/useInitialEditingData.ts rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useInitialEditingData.ts diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/hooks/useReconfigureFundingCycle.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useReconfigureFundingCycle.ts similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/hooks/useReconfigureFundingCycle.ts rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useReconfigureFundingCycle.ts diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/AdvancedDropdown.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/AdvancedDropdown.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/AdvancedDropdown.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/AdvancedDropdown.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/CycleDeadlineDropdown.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/CycleDeadlineDropdown.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/CycleDeadlineDropdown.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/CycleDeadlineDropdown.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/DetailsSection.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/DetailsSection.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/DetailsSection.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/DetailsSection.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/DetailsSectionAdvanced.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/DetailsSectionAdvanced.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/DetailsSectionAdvanced.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/DetailsSectionAdvanced.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/DurationFields.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/DurationFields.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/DurationFields.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/DurationFields.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/index.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/index.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/DetailsSection/index.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/DetailsSection/index.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/EditCycleFormContext.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleFormContext.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/EditCycleFormContext.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleFormContext.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/EditCycleFormFields.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleFormFields.ts similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/EditCycleFormFields.ts rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleFormFields.ts diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/EditCycleFormSection.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleFormSection.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/EditCycleFormSection.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleFormSection.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/EditCycleHeader.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleHeader.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/EditCycleHeader.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleHeader.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/EditCyclePage.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCyclePage.tsx similarity index 98% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/EditCyclePage.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCyclePage.tsx index 5e6e8d7cf9..a04862adba 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/EditCyclePage.tsx +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCyclePage.tsx @@ -110,7 +110,7 @@ export function EditCyclePage() { ref={tokensRef} title={Tokens} description={ - Manage how your projects tokens should work. + Manage how your project's tokens should work. } className="border-b-0" > diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsSection.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsSection.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsSection.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsSection.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/HeaderRows.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/HeaderRows.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/HeaderRows.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/HeaderRows.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRow.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRow.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRow.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRow.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRowMenu.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRowMenu.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRowMenu.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRowMenu.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutTableSettings.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutTableSettings.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutTableSettings.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutTableSettings.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutTitle.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutTitle.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutTitle.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutTitle.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutsTable.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTable.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutsTable.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTable.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableBody.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableBody.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableBody.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableBody.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableCell.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableCell.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableCell.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableCell.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableRow.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableRow.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableRow.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableRow.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/TotalRows.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/TotalRows.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/TotalRows.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/TotalRows.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/context/PayoutsTableContext.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/context/PayoutsTableContext.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/context/PayoutsTableContext.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/context/PayoutsTableContext.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/index.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/index.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/index.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/index.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/modals/SwitchToLimitedModal.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/modals/SwitchToLimitedModal.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/modals/SwitchToLimitedModal.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/modals/SwitchToLimitedModal.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/modals/SwitchToUnlimitedModal.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/modals/SwitchToUnlimitedModal.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/PayoutsTable/modals/SwitchToUnlimitedModal.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/modals/SwitchToUnlimitedModal.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/hooks/usePayoutsTable.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/hooks/usePayoutsTable.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/hooks/usePayoutsTable.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/hooks/usePayoutsTable.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/index.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/index.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/PayoutsSection/index.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/index.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/DetailsSectionDiff.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/DetailsSectionDiff.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/DetailsSectionDiff.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/DetailsSectionDiff.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/DiffSection.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/DiffSection.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/DiffSection.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/DiffSection.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/PayoutsSectionDiff.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/PayoutsSectionDiff.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/PayoutsSectionDiff.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/PayoutsSectionDiff.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx similarity index 97% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx index cb4c2da587..713b3e3053 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx @@ -6,7 +6,7 @@ import { JuiceTextArea } from 'components/inputs/JuiceTextArea' import TransactionModal from 'components/modals/TransactionModal' import { useState } from 'react' import { TransactionSuccessModal } from '../../../TransactionSuccessModal' -import { useReconfigureFundingCycle } from '../../ReconfigureFundingCycleSettingsPage/hooks/useReconfigureFundingCycle' +import { useReconfigureFundingCycle } from '../../../hooks/useReconfigureFundingCycle' import { useEditCycleFormContext } from '../EditCycleFormContext' import { usePrepareSaveEditCycleData } from '../hooks/usePrepareSaveEditCycleData' import { DetailsSectionDiff } from './DetailsSectionDiff' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/SectionCollapseHeader.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/SectionCollapseHeader.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/SectionCollapseHeader.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/SectionCollapseHeader.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/TokensSectionDiff.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/TokensSectionDiff.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/TokensSectionDiff.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/TokensSectionDiff.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/hooks/useDetailsSectionValues.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/hooks/useDetailsSectionValues.ts similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/hooks/useDetailsSectionValues.ts rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/hooks/useDetailsSectionValues.ts diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/hooks/usePayoutsSectionValues.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/hooks/usePayoutsSectionValues.ts similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/hooks/usePayoutsSectionValues.ts rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/hooks/usePayoutsSectionValues.ts diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/hooks/useTokensSectionValues.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/hooks/useTokensSectionValues.ts similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/hooks/useTokensSectionValues.ts rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/hooks/useTokensSectionValues.ts diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/index.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/index.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/ReviewConfirmModal/index.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/ReviewConfirmModal/index.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/IssuanceRateReductionField.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/IssuanceRateReductionField.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/IssuanceRateReductionField.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/IssuanceRateReductionField.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/MintRateField.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/MintRateField.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/MintRateField.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/MintRateField.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/RedemptionRateField.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/RedemptionRateField.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/RedemptionRateField.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/RedemptionRateField.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/ReservedTokensField.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/ReservedTokensField.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/ReservedTokensField.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/ReservedTokensField.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/TokensSection.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/TokensSection.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/TokensSection.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/TokensSection.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/TokensSectionAdvanced.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/TokensSectionAdvanced.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/TokensSectionAdvanced.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/TokensSectionAdvanced.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/index.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/index.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/TokensSection/index.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/TokensSection/index.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/hooks/useEditCycleFormHasError.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/useEditCycleFormHasError.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/hooks/useEditCycleFormHasError.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/useEditCycleFormHasError.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/hooks/useLoadEditCycleData.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/useLoadEditCycleData.tsx similarity index 97% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/hooks/useLoadEditCycleData.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/useLoadEditCycleData.tsx index 757237afc3..812f7349bb 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/hooks/useLoadEditCycleData.tsx +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/useLoadEditCycleData.tsx @@ -19,7 +19,7 @@ import { formatReservedRate, } from 'utils/v2v3/math' import { deserializeV2V3FundingCycleData } from 'utils/v2v3/serializers' -import { useInitialEditingData } from '../../ReconfigureFundingCycleSettingsPage/hooks/useInitialEditingData' +import { useInitialEditingData } from '../../../hooks/useInitialEditingData' import { EditCycleFormFields } from '../EditCycleFormFields' /** Loads project FC data from redux into an Ant D form instance */ diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/hooks/usePrepareSaveEditCycleData.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/usePrepareSaveEditCycleData.tsx similarity index 98% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/hooks/usePrepareSaveEditCycleData.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/usePrepareSaveEditCycleData.tsx index d2c52b43f5..654ecd202d 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/NewEditCyclePage/hooks/usePrepareSaveEditCycleData.tsx +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/hooks/usePrepareSaveEditCycleData.tsx @@ -27,7 +27,7 @@ import { import { EditingFundingCycleConfig, useEditingFundingCycleConfig, -} from '../../ReconfigureFundingCycleSettingsPage/hooks/useEditingFundingCycleConfig' +} from '../../../hooks/useEditingFundingCycleConfig' import { useEditCycleFormContext } from '../EditCycleFormContext' import { EditCycleFormFields } from '../EditCycleFormFields' import { useTokensSectionValues } from '../ReviewConfirmModal/hooks/useTokensSectionValues' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditNftsPage/LaunchNftCollection/hooks/useLaunchNftsForm.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditNftsPage/LaunchNftCollection/hooks/useLaunchNftsForm.ts index 87d0b735c2..4f466125d9 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditNftsPage/LaunchNftCollection/hooks/useLaunchNftsForm.ts +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditNftsPage/LaunchNftCollection/hooks/useLaunchNftsForm.ts @@ -13,8 +13,8 @@ import { import { EditingFundingCycleConfig, useEditingFundingCycleConfig, -} from '../../../ReconfigureFundingCycleSettingsPage/hooks/useEditingFundingCycleConfig' -import { useReconfigureFundingCycle } from '../../../ReconfigureFundingCycleSettingsPage/hooks/useReconfigureFundingCycle' +} from '../../../../hooks/useEditingFundingCycleConfig' +import { useReconfigureFundingCycle } from '../../../../hooks/useReconfigureFundingCycle' export const useLaunchNftsForm = () => { const [form] = useForm() diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/LaunchFundingCycleForm.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/LaunchFundingCycleForm.tsx index ecea83889c..8c1ad05ded 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/LaunchFundingCycleForm.tsx +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/LaunchFundingCycleForm.tsx @@ -16,10 +16,10 @@ import { useContext, useState } from 'react' import { useDispatch } from 'react-redux' import { editingV2ProjectActions } from 'redux/slices/editingV2Project' import { formatDate } from 'utils/format/formatDate' -import { useEditingFundingCycleConfig } from '../../../../../ReconfigureFundingCycleSettingsPage/hooks/useEditingFundingCycleConfig' -import { ReconfigurePreview } from '../../../../../ReconfigureFundingCycleSettingsPage/ReconfigurePreview' -import { SetNftOperatorPermissionsButton } from '../../../../../ReconfigureFundingCycleSettingsPage/SetNftOperatorPermissionsButton' +import { useEditingFundingCycleConfig } from '../../../../../../hooks/useEditingFundingCycleConfig' import { useLaunchFundingCycles } from './hooks/useLaunchFundingCycles' +import { ReconfigurePreview } from './ReconfigurePreview' +import { SetNftOperatorPermissionsButton } from './SetNftOperatorPermissionsButton' export function LaunchFundingCycleForm() { const { projectOwnerAddress, fundingCycle } = useContext(V2V3ProjectContext) diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigurePreview/NftSummarySection.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/NftSummarySection.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigurePreview/NftSummarySection.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/NftSummarySection.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigurePreview/ReconfigurePreview.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/ReconfigurePreview.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigurePreview/ReconfigurePreview.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/ReconfigurePreview.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/SetNftOperatorPermissionsButton.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/SetNftOperatorPermissionsButton.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/SetNftOperatorPermissionsButton.tsx rename to src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/SetNftOperatorPermissionsButton.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/UpgradeFundingCycle.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/UpgradeFundingCycle.tsx index 75d99206ce..b961a289c3 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/UpgradeFundingCycle.tsx +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/UpgradeFundingCycle.tsx @@ -4,7 +4,7 @@ import { V2V3ContractsProvider } from 'contexts/v2v3/Contracts/V2V3ContractsProv import { useRef } from 'react' import { Provider } from 'react-redux' import store, { createStore } from 'redux/store' -import { useInitialEditingData } from '../../../../../ReconfigureFundingCycleSettingsPage/hooks/useInitialEditingData' +import { useInitialEditingData } from '../../../../../../hooks/useInitialEditingData' import { LaunchFundingCycleForm } from './LaunchFundingCycleForm' /** diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchFundingCycles.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchFundingCycles.ts index b1300d0a79..4f7f597d4b 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchFundingCycles.ts +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchFundingCycles.ts @@ -1,5 +1,5 @@ import { useIsNftProject } from 'components/Create/hooks/DeployProject/hooks' -import { EditingFundingCycleConfig } from 'components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/hooks/useEditingFundingCycleConfig' +import { EditingFundingCycleConfig } from 'components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useEditingFundingCycleConfig' import { ProjectMetadataContext } from 'contexts/shared/ProjectMetadataContext' import { revalidateProject } from 'lib/api/nextjs' import { PV2 } from 'models/pv' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchFundingCyclesData.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchFundingCyclesData.ts index 7aea8e295b..bd5a69385a 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchFundingCyclesData.ts +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchFundingCyclesData.ts @@ -1,4 +1,4 @@ -import { EditingFundingCycleConfig } from 'components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/hooks/useEditingFundingCycleConfig' +import { EditingFundingCycleConfig } from 'components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useEditingFundingCycleConfig' import { ProjectMetadataContext } from 'contexts/shared/ProjectMetadataContext' import { V2V3ProjectContext } from 'contexts/v2v3/Project/V2V3ProjectContext' import { BigNumber } from 'ethers' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchNftFundingCycle.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchNftFundingCycle.ts index 62d869f448..c24639acf9 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchNftFundingCycle.ts +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchNftFundingCycle.ts @@ -1,4 +1,4 @@ -import { EditingFundingCycleConfig } from 'components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/hooks/useEditingFundingCycleConfig' +import { EditingFundingCycleConfig } from 'components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useEditingFundingCycleConfig' import { ProjectMetadataContext } from 'contexts/shared/ProjectMetadataContext' import { useLaunchFundingCyclesWithNftsTx } from 'hooks/JB721Delegate/transactor/useLaunchFundingCyclesWithNftsTx' import { LaunchFundingCyclesData } from 'hooks/v2v3/transactor/useLaunchFundingCyclesTx' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchStandardFundingCycle.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchStandardFundingCycle.ts index 16b236a6af..74bd5a5cfd 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchStandardFundingCycle.ts +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ProjectUpgradesPage/versions/upgradeForms/V3/UpgradeFundingCycle/hooks/useLaunchStandardFundingCycle.ts @@ -1,4 +1,4 @@ -import { EditingFundingCycleConfig } from 'components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/hooks/useEditingFundingCycleConfig' +import { EditingFundingCycleConfig } from 'components/v2v3/V2V3Project/V2V3ProjectSettings/hooks/useEditingFundingCycleConfig' import { ProjectMetadataContext } from 'contexts/shared/ProjectMetadataContext' import { useLaunchFundingCyclesTx } from 'hooks/v2v3/transactor/useLaunchFundingCyclesTx' import { TransactionCallbacks } from 'models/transaction' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/DeployConfigurationButton.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/DeployConfigurationButton.tsx deleted file mode 100644 index caed190d02..0000000000 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/DeployConfigurationButton.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { Trans } from '@lingui/macro' -import { Button } from 'antd' - -export function DeployConfigurationButton({ - className, - onClick, - disabled, - loading, -}: { - className?: string - onClick: VoidFunction - disabled?: boolean - loading: boolean -}) { - return ( - - ) -} diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigureFundingCycleForm.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigureFundingCycleForm.tsx deleted file mode 100644 index e2ea59bb73..0000000000 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigureFundingCycleForm.tsx +++ /dev/null @@ -1,282 +0,0 @@ -import { t, Trans } from '@lingui/macro' -import { Divider, Form, Input } from 'antd' -import RichButton, { RichButtonProps } from 'components/buttons/RichButton' -import { Callout } from 'components/Callout' -import ExternalLink from 'components/ExternalLink' -import UnsavedChangesModal from 'components/modals/UnsavedChangesModal' -import { MemoFormInput } from 'components/Project/PayProjectForm/MemoFormInput' -import TooltipIcon from 'components/TooltipIcon' -import { FundingDrawer } from 'components/v2v3/shared/FundingCycleConfigurationDrawers/FundingDrawer' -import { NftDrawer } from 'components/v2v3/shared/FundingCycleConfigurationDrawers/NftDrawer' -import { RulesDrawer } from 'components/v2v3/shared/FundingCycleConfigurationDrawers/RulesDrawer' -import { TokenDrawer } from 'components/v2v3/shared/FundingCycleConfigurationDrawers/TokenDrawer' -import { CV_V3 } from 'constants/cv' -import { NftRewardsContext } from 'contexts/NftRewards/NftRewardsContext' -import { ProjectMetadataContext } from 'contexts/shared/ProjectMetadataContext' -import { V2V3ContractsContext } from 'contexts/v2v3/Contracts/V2V3ContractsContext' -import { V2V3ProjectContext } from 'contexts/v2v3/Project/V2V3ProjectContext' -import { useNftDeployerCanReconfigure } from 'hooks/JB721Delegate/contractReader/useNftDeployerCanReconfigure' -import { useContext, useState } from 'react' -import { useAppDispatch } from 'redux/hooks/useAppDispatch' -import { - DEFAULT_MUST_START_AT_OR_AFTER, - editingV2ProjectActions, -} from 'redux/slices/editingV2Project' -import { formatDate } from 'utils/format/formatDate' -import { DeployConfigurationButton } from './DeployConfigurationButton' -import { useEditingFundingCycleConfig } from './hooks/useEditingFundingCycleConfig' -import { useFundingHasSavedChanges } from './hooks/useFundingHasSavedChanges' -import { useInitialEditingData } from './hooks/useInitialEditingData' -import { useReconfigureFundingCycle } from './hooks/useReconfigureFundingCycle' -import { ReconfigurePreview } from './ReconfigurePreview' -import V2V3ReconfigureUpcomingMessage from './ReconfigureUpcomingMessage' -import { SetNftOperatorPermissionsButton } from './SetNftOperatorPermissionsButton' - -function ReconfigureButton({ - reconfigureHasChanges, - ...props -}: { - reconfigureHasChanges: boolean -} & RichButtonProps) { - return ( - - ) -} - -export function V2V3ReconfigureFundingCycleForm() { - const { fundingCycleMetadata, projectOwnerAddress } = - useContext(V2V3ProjectContext) - const { projectId } = useContext(ProjectMetadataContext) - const { cv } = useContext(V2V3ContractsContext) - const { - nftRewards: { CIDs: nftRewardsCids }, - } = useContext(NftRewardsContext) - - const [memo, setMemo] = useState('') - const [fundingDrawerVisible, setFundingDrawerVisible] = - useState(false) - const [tokenDrawerVisible, setTokenDrawerVisible] = useState(false) - const [nftDrawerVisible, setNftDrawerVisible] = useState(false) - const [rulesDrawerVisible, setRulesDrawerVisible] = useState(false) - const [unsavedChangesModalVisibile, setUnsavedChangesModalVisible] = - useState(false) - const [nftOperatorConfirmed, setNftOperatorConfirmed] = useState() - - const dispatch = useAppDispatch() - const { initialEditingData } = useInitialEditingData({ visible: true }) - const editingFundingCycleConfig = useEditingFundingCycleConfig() - const { - fundingHasSavedChanges, - fundingDrawerHasSavedChanges, - tokenDrawerHasSavedChanges, - rulesDrawerHasSavedChanges, - nftDrawerHasSavedChanges, - } = useFundingHasSavedChanges({ - editingFundingCycleConfig, - initialEditingData, - }) - const nftDeployerCanReconfigure = useNftDeployerCanReconfigure({ - projectId, - projectOwnerAddress, - }) - - const { reconfigureLoading, reconfigureFundingCycle } = - useReconfigureFundingCycle({ - editingFundingCycleConfig, - memo, - launchedNewNfts: nftDrawerHasSavedChanges, - }) - - const closeReconfigureDrawer = () => { - setFundingDrawerVisible(false) - setTokenDrawerVisible(false) - setRulesDrawerVisible(false) - setNftDrawerVisible(false) - } - - const closeUnsavedChangesModal = () => setUnsavedChangesModalVisible(false) - - const closeUnsavedChangesModalAndExit = () => { - closeUnsavedChangesModal() - } - - const nftsWithFalseDataSourceForPay = Boolean( - nftRewardsCids?.length && !fundingCycleMetadata?.useDataSourceForPay, - ) - - const isV3 = cv === CV_V3 - - return ( - <> -
- - - setFundingDrawerVisible(true)} - /> - setTokenDrawerVisible(true)} - /> - setRulesDrawerVisible(true)} - /> - {isV3 ? ( - setNftDrawerVisible(true)} - /> - ) : null} - -
- - - - Start time} - extra={ - - Unix timestamp in seconds (for example,{' '} - {Math.floor(Date.now() / 1000)}). Leave blank to start as soon - as possible. - - } - required={false} - requiredMark="optional" - className="mb-0" - > - { - const val = e.target.value - const time = `${val.length ? val : 0}` - dispatch(editingV2ProjectActions.setMustStartAtOrAfter(time)) - }} - addonAfter={ - - {editingFundingCycleConfig?.editingMustStartAtOrAfter !== - DEFAULT_MUST_START_AT_OR_AFTER - ? formatDate( - parseInt( - editingFundingCycleConfig.editingMustStartAtOrAfter, - ) * 1000, - ) - : null} - - } - /> - -
- - - -

- Review reconfiguration -

- - - {nftDrawerHasSavedChanges && !nftDeployerCanReconfigure ? ( -
- - - You're about to add NFTs to your cycle. You'll need to{' '} - grant NFT permissions before deploying the new - cycle - {' '} - - Allow the{' '} - - Juicebox NFT deployer contract - {' '} - to edit this project's cycle. - - } - /> - -
- setNftOperatorConfirmed(true)} - /> -
-
- -
-
- ) : ( - - )} -
- - - - - - - - - ) -} diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigureFundingCycleSettingsPage.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigureFundingCycleSettingsPage.tsx deleted file mode 100644 index 359e2f797f..0000000000 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigureFundingCycleSettingsPage.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { useRef } from 'react' -import { Provider } from 'react-redux' -import store, { createStore } from 'redux/store' -import { V2V3ReconfigureFundingCycleForm } from './ReconfigureFundingCycleForm' - -// This component uses a local version of the entire Redux store -// so editing within the Reconfigure Funding modal does not -// conflict with existing Redux state. This is so editing a -// persisted Redux state and the Reconfigure Funding modal -// are independent. -export function ReconfigureFundingCycleSettingsPage() { - const localStoreRef = useRef() - if (!localStoreRef.current) { - localStoreRef.current = createStore() - } - - return ( - <> - {localStoreRef.current && ( - - - - )} - - ) -} diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigurePreview/index.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigurePreview/index.ts deleted file mode 100644 index 5107b1d3da..0000000000 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigurePreview/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { ReconfigurePreview } from './ReconfigurePreview' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigureUpcomingMessage.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigureUpcomingMessage.tsx deleted file mode 100644 index ccb45713f2..0000000000 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/ReconfigureUpcomingMessage.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import { Trans } from '@lingui/macro' -import { Callout } from 'components/Callout' -import { V2V3ProjectContext } from 'contexts/v2v3/Project/V2V3ProjectContext' -import { BigNumber } from 'ethers' -import { useContext } from 'react' - -import { detailedTimeString, secondsUntil } from 'utils/format/formatTime' - -import { getBallotStrategyByAddress } from 'utils/v2v3/ballotStrategies' - -export default function V2V3ReconfigureUpcomingMessage() { - const { fundingCycle } = useContext(V2V3ProjectContext) - if (!fundingCycle) return null - - const currentFCNumber = fundingCycle.number.toNumber() - - const ballotStrategy = getBallotStrategyByAddress(fundingCycle.ballot) - const ballotStrategyLength = ballotStrategy.durationSeconds - - const duration = fundingCycle.duration.toNumber() - - const secondsUntilNextFC = secondsUntil(fundingCycle.start.add(duration)) - - let message - - // Separating the full message out like this for translation purposes - // (they need full sentences, can't chop and change) - if (!duration || duration === 0) { - // If duration is unset/0, changes take effect immediately to current FC - message = ( - - Your project's current cycle has no duration. Edits you make below will - take effect immediately. - - ) - } else if (ballotStrategyLength === undefined) { - message = ( - - The edits you make below may take effect, depending on the project's - custom edit deadline contract. - - ) - } else if (ballotStrategyLength > secondsUntilNextFC) { - message = ( - - Due to your {ballotStrategy.name} contract, edits you - make will not take effect until the first cycle to start at least{' '} - - {detailedTimeString({ - timeSeconds: BigNumber.from(ballotStrategyLength), - fullWords: true, - })} - {' '} - from now. - - ) - } else { - message = ( - <> -
- - Your edits will take effect in{' '} - cycle #{currentFCNumber + 1}. The current cycle (# - {currentFCNumber}) won't be altered. - -
-
-
- Time remaining for edits to affect the next cycle: -
-
- - {detailedTimeString({ - timeSeconds: BigNumber.from( - secondsUntilNextFC - ballotStrategyLength, - ), - fullWords: true, - })} - - . -
- - ) - } - - return !message ? null : {message} -} diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/index.ts b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/index.ts deleted file mode 100644 index ee31b4f5f7..0000000000 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReconfigureFundingCycleSettingsPage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { ReconfigureFundingCycleSettingsPage } from './ReconfigureFundingCycleSettingsPage' diff --git a/src/constants/featureFlags.ts b/src/constants/featureFlags.ts index 464978f9d5..4dfd519cd5 100644 --- a/src/constants/featureFlags.ts +++ b/src/constants/featureFlags.ts @@ -1,12 +1,10 @@ export type FeatureFlag = | 'SIMULATE_TXS' | 'NEW_PROJECT_PAGE' - | 'NEW_CYCLE_CONFIG_PAGE' | 'PAYOUTS_TABLE_CREATE_FLOW' export const FEATURE_FLAGS: { [k in FeatureFlag]: string } = { SIMULATE_TXS: 'simulateTxs', NEW_PROJECT_PAGE: 'newProjectPage', - NEW_CYCLE_CONFIG_PAGE: 'newCycleConfigPage', PAYOUTS_TABLE_CREATE_FLOW: 'payoutsTableCreateFlow', } diff --git a/src/locales/messages.pot b/src/locales/messages.pot index cd280357bf..59ddde98ac 100644 --- a/src/locales/messages.pot +++ b/src/locales/messages.pot @@ -152,9 +152,6 @@ msgstr "" msgid "Data from current cycle" msgstr "" -msgid "You're about to add NFTs to your cycle. You'll need to <0>grant NFT permissions before deploying the new cycle" -msgstr "" - msgid "Add NFT" msgstr "" @@ -446,6 +443,9 @@ msgstr "" msgid "You've completed this step." msgstr "" +msgid "Manage how your project's tokens should work." +msgstr "" + msgid "Connect wallet to send reserved {tokenTextPlural}" msgstr "" @@ -902,9 +902,6 @@ msgstr "" msgid "This account hasn't created any projects yet." msgstr "" -msgid "Restrictions for your cycles." -msgstr "" - msgid "Project upgrades" msgstr "" @@ -2318,9 +2315,6 @@ msgstr "" msgid "Your project can still receive payments directly through the Juicebox protocol contracts." msgstr "" -msgid "Deploy cycle" -msgstr "" - msgid "Juicebox native" msgstr "" @@ -2660,9 +2654,6 @@ msgstr "" msgid "Error downloading redemptions, try again." msgstr "" -msgid "Review reconfiguration" -msgstr "" - msgid "Seconds" msgstr "" @@ -3224,9 +3215,6 @@ msgstr "" msgid "Connect wallet to pay" msgstr "" -msgid "How your project will be paid and pay out ETH." -msgstr "" - msgid "Mint tokens as ERC-20" msgstr "" @@ -3773,9 +3761,6 @@ msgstr "" msgid "Project settings" msgstr "" -msgid "Unix timestamp in seconds (for example, {0}). Leave blank to start as soon as possible." -msgstr "" - msgid "The issuance rate will not change unless you edit it. There will be less of an incentive to support this project early on." msgstr "" @@ -4097,9 +4082,6 @@ msgstr "" msgid "Discord link" msgstr "" -msgid "Your project's token." -msgstr "" - msgid "Minimum contribution" msgstr "" @@ -4511,9 +4493,6 @@ msgstr "" msgid "Start" msgstr "" -msgid "Manage how your projects tokens should work." -msgstr "" - msgid "File empty or corrupt. Try again." msgstr "" @@ -4637,9 +4616,6 @@ msgstr "" msgid "Data from upcoming cycle" msgstr "" -msgid "Your project's NFTs." -msgstr "" - msgid "Visit jbdao.org" msgstr "" diff --git a/src/utils/featureFlags.ts b/src/utils/featureFlags.ts index fefb3d4024..74940b2d9d 100644 --- a/src/utils/featureFlags.ts +++ b/src/utils/featureFlags.ts @@ -18,11 +18,6 @@ const FEATURE_FLAG_DEFAULTS: { goerli: true, localhost: true, }, - [FEATURE_FLAGS.NEW_CYCLE_CONFIG_PAGE]: { - mainnet: true, - goerli: true, - localhost: true, - }, } const featureFlagKey = (baseKey: string) => {