diff --git a/src/components/Create/Create.tsx b/src/components/Create/Create.tsx index be43b7494c..bc95ce83fb 100644 --- a/src/components/Create/Create.tsx +++ b/src/components/Create/Create.tsx @@ -18,9 +18,9 @@ import { PayoutsPage } from './components/pages/PayoutsPage/PayoutsPage' import { ProjectDetailsPage } from './components/pages/ProjectDetails/ProjectDetailsPage' import { ProjectTokenPage } from './components/pages/ProjectToken/ProjectTokenPage' import { ReconfigurationRulesPage } from './components/pages/ReconfigurationRules/ReconfigurationRulesPage' -import { DeploySuccess } from './components/pages/ReviewDeploy/components/DeploySuccess/DeploySuccess' +import { DeploySuccess } from './components/pages/ReviewDeploy/components/DeploySuccess' import { ReviewDeployPage } from './components/pages/ReviewDeploy/ReviewDeployPage' -import { PayoutsMigrationModal } from './components/PayoutsMigrationModal/PayoutsMigrationModal' +import { PayoutsMigrationModal } from './components/PayoutsMigrationModal' import { Wizard } from './components/Wizard/Wizard' import { useLoadingInitialStateFromQuery } from './hooks/useLoadInitialStateFromQuery' diff --git a/src/components/Create/components/OptionalHeader/OptionalHeader.tsx b/src/components/Create/components/OptionalHeader.tsx similarity index 100% rename from src/components/Create/components/OptionalHeader/OptionalHeader.tsx rename to src/components/Create/components/OptionalHeader.tsx diff --git a/src/components/Create/components/PayoutsMigrationModal/PayoutsMigrationModal.tsx b/src/components/Create/components/PayoutsMigrationModal.tsx similarity index 100% rename from src/components/Create/components/PayoutsMigrationModal/PayoutsMigrationModal.tsx rename to src/components/Create/components/PayoutsMigrationModal.tsx diff --git a/src/components/Create/components/pages/FundingCycles/FundingCyclesPage.tsx b/src/components/Create/components/pages/FundingCycles/FundingCyclesPage.tsx index e9a380eef3..b7a7f4ed5a 100644 --- a/src/components/Create/components/pages/FundingCycles/FundingCyclesPage.tsx +++ b/src/components/Create/components/pages/FundingCycles/FundingCyclesPage.tsx @@ -20,7 +20,7 @@ import { durationMustExistRule } from 'utils/antdRules' import { CreateBadge } from '../../CreateBadge' import { CreateCollapse } from '../../CreateCollapse/CreateCollapse' import { Icons } from '../../Icons' -import { OptionalHeader } from '../../OptionalHeader/OptionalHeader' +import { OptionalHeader } from '../../OptionalHeader' import { Selection } from '../../Selection/Selection' import { Wizard } from '../../Wizard/Wizard' import { PageContext } from '../../Wizard/contexts/PageContext' diff --git a/src/components/Create/components/pages/PayoutsPage/components/CreateFlowPayoutsTable.tsx b/src/components/Create/components/pages/PayoutsPage/components/CreateFlowPayoutsTable.tsx index 3ae0051680..0dfad91314 100644 --- a/src/components/Create/components/pages/PayoutsPage/components/CreateFlowPayoutsTable.tsx +++ b/src/components/Create/components/pages/PayoutsPage/components/CreateFlowPayoutsTable.tsx @@ -1,5 +1,5 @@ import { Form } from 'antd' -import PayoutsTable from 'components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable' +import { PayoutsTable } from 'components/v2v3/shared/PayoutsTable/PayoutsTable' import { CURRENCY_METADATA, CurrencyName } from 'constants/currency' import { Split } from 'models/splits' import { ReactNode } from 'react' diff --git a/src/components/Create/components/pages/PayoutsPage/components/TreasuryOptionsRadio.tsx b/src/components/Create/components/pages/PayoutsPage/components/TreasuryOptionsRadio.tsx index b1744fd29b..f6e6a95cc8 100644 --- a/src/components/Create/components/pages/PayoutsPage/components/TreasuryOptionsRadio.tsx +++ b/src/components/Create/components/pages/PayoutsPage/components/TreasuryOptionsRadio.tsx @@ -3,8 +3,8 @@ import { RadioGroup } from '@headlessui/react' import { t } from '@lingui/macro' import { Callout } from 'components/Callout/Callout' import { DeleteConfirmationModal } from 'components/modals/DeleteConfirmationModal' -import { SwitchToUnlimitedModal } from 'components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/modals/SwitchToUnlimitedModal' -import { usePayoutsTable } from 'components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/hooks/usePayoutsTable' +import { usePayoutsTable } from 'components/v2v3/shared/PayoutsTable/hooks/usePayoutsTable' +import { SwitchToUnlimitedModal } from 'components/v2v3/shared/PayoutsTable/modals/SwitchToUnlimitedModal' import { useModal } from 'hooks/useModal' import { TreasurySelection } from 'models/treasurySelection' import { useCallback, useEffect, useMemo, useState } from 'react' diff --git a/src/components/Create/components/pages/ProjectDetails/ProjectDetailsPage.tsx b/src/components/Create/components/pages/ProjectDetails/ProjectDetailsPage.tsx index d887de9e80..aba82b5c17 100644 --- a/src/components/Create/components/pages/ProjectDetails/ProjectDetailsPage.tsx +++ b/src/components/Create/components/pages/ProjectDetails/ProjectDetailsPage.tsx @@ -25,7 +25,7 @@ import { inputIsLengthRule } from 'utils/antdRules/inputIsLengthRule' import { featureFlagEnabled } from 'utils/featureFlags' import { V2V3_CURRENCY_ETH, V2V3_CURRENCY_USD } from 'utils/v2v3/currency' import { CreateCollapse } from '../../CreateCollapse/CreateCollapse' -import { OptionalHeader } from '../../OptionalHeader/OptionalHeader' +import { OptionalHeader } from '../../OptionalHeader' import { PageContext } from '../../Wizard/contexts/PageContext' import { Wizard } from '../../Wizard/Wizard' import { useProjectDetailsForm } from './hooks/useProjectDetailsForm' diff --git a/src/components/Create/components/pages/ProjectToken/ProjectTokenPage.tsx b/src/components/Create/components/pages/ProjectToken/ProjectTokenPage.tsx index 940f4c5852..f28ba94cac 100644 --- a/src/components/Create/components/pages/ProjectToken/ProjectTokenPage.tsx +++ b/src/components/Create/components/pages/ProjectToken/ProjectTokenPage.tsx @@ -13,7 +13,7 @@ import { Selection } from '../../Selection/Selection' import { PageContext } from '../../Wizard/contexts/PageContext' import { Wizard } from '../../Wizard/Wizard' import { CustomTokenSettings } from './components/CustomTokenSettings/CustomTokenSettings' -import { DefaultSettings } from './components/DefaultSettings/DefaultSettings' +import { DefaultSettings } from './components/DefaultSettings' import { useProjectTokensForm } from './hooks/useProjectTokenForm' export const ProjectTokenPage: React.FC< diff --git a/src/components/Create/components/pages/ProjectToken/components/CustomTokenSettings/CustomTokenSettings.tsx b/src/components/Create/components/pages/ProjectToken/components/CustomTokenSettings/CustomTokenSettings.tsx index fbcc0efd00..783f4be558 100644 --- a/src/components/Create/components/pages/ProjectToken/components/CustomTokenSettings/CustomTokenSettings.tsx +++ b/src/components/Create/components/pages/ProjectToken/components/CustomTokenSettings/CustomTokenSettings.tsx @@ -13,6 +13,7 @@ import { REDEMPTION_RATE_EXPLANATION, } from 'components/strings' import { TokenRedemptionRateGraph } from 'components/TokenRedemptionRateGraph/TokenRedemptionRateGraph' +import { ReservedTokensList } from 'components/v2v3/shared/ReservedTokensList' import useMobile from 'hooks/useMobile' import { useAppSelector } from 'redux/hooks/useAppSelector' import { useEditingDistributionLimit } from 'redux/hooks/useEditingDistributionLimit' @@ -21,8 +22,7 @@ import { formatAmount } from 'utils/format/formatAmount' import { MAX_DISTRIBUTION_LIMIT, MAX_MINT_RATE } from 'utils/v2v3/math' import * as ProjectTokenForm from '../../hooks/useProjectTokenForm' import { ProjectTokensFormProps } from '../../hooks/useProjectTokenForm' -import { ReservedTokenRateCallout } from './components/ReservedTokenRateCallout/ReservedTokenRateCallout' -import { ReservedTokensList } from './components/ReservedTokensList/ReservedTokensList' +import { ReservedTokenRateCallout } from './ReservedTokenRateCallout' const calculateMintRateAfterDiscount = ({ mintRate, diff --git a/src/components/Create/components/pages/ProjectToken/components/CustomTokenSettings/components/ReservedTokenRateCallout/ReservedTokenRateCallout.tsx b/src/components/Create/components/pages/ProjectToken/components/CustomTokenSettings/ReservedTokenRateCallout.tsx similarity index 94% rename from src/components/Create/components/pages/ProjectToken/components/CustomTokenSettings/components/ReservedTokenRateCallout/ReservedTokenRateCallout.tsx rename to src/components/Create/components/pages/ProjectToken/components/CustomTokenSettings/ReservedTokenRateCallout.tsx index 7fabc8d29f..f3a54bd0d6 100644 --- a/src/components/Create/components/pages/ProjectToken/components/CustomTokenSettings/components/ReservedTokenRateCallout/ReservedTokenRateCallout.tsx +++ b/src/components/Create/components/pages/ProjectToken/components/CustomTokenSettings/ReservedTokenRateCallout.tsx @@ -3,7 +3,7 @@ import { Form } from 'antd' import { Callout } from 'components/Callout/Callout' import { useMemo } from 'react' import { formattedNum } from 'utils/format/formatNumber' -import { ProjectTokensFormProps } from '../../../../hooks/useProjectTokenForm' +import { ProjectTokensFormProps } from '../../hooks/useProjectTokenForm' export const ReservedTokenRateCallout: React.FC< React.PropsWithChildren diff --git a/src/components/Create/components/pages/ProjectToken/components/DefaultSettings/DefaultSettings.tsx b/src/components/Create/components/pages/ProjectToken/components/DefaultSettings.tsx similarity index 96% rename from src/components/Create/components/pages/ProjectToken/components/DefaultSettings/DefaultSettings.tsx rename to src/components/Create/components/pages/ProjectToken/components/DefaultSettings.tsx index 932ff0032d..ac3008a5e6 100644 --- a/src/components/Create/components/pages/ProjectToken/components/DefaultSettings/DefaultSettings.tsx +++ b/src/components/Create/components/pages/ProjectToken/components/DefaultSettings.tsx @@ -11,7 +11,7 @@ import { import { ReactNode, useMemo } from 'react' import { formatAmount } from 'utils/format/formatAmount' import { formatBoolean } from 'utils/format/formatBoolean' -import * as ProjectTokenForm from '../../hooks/useProjectTokenForm' +import * as ProjectTokenForm from '../hooks/useProjectTokenForm' export const DefaultSettings: React.FC< React.PropsWithChildren diff --git a/src/components/Create/components/pages/ReviewDeploy/components/DeploySuccess/DeploySuccess.tsx b/src/components/Create/components/pages/ReviewDeploy/components/DeploySuccess.tsx similarity index 100% rename from src/components/Create/components/pages/ReviewDeploy/components/DeploySuccess/DeploySuccess.tsx rename to src/components/Create/components/pages/ReviewDeploy/components/DeploySuccess.tsx diff --git a/src/components/Create/components/pages/ReviewDeploy/components/FundingConfigurationReview/FundingConfigurationReview.tsx b/src/components/Create/components/pages/ReviewDeploy/components/FundingConfigurationReview/FundingConfigurationReview.tsx index f011ac9055..b3ed62e039 100644 --- a/src/components/Create/components/pages/ReviewDeploy/components/FundingConfigurationReview/FundingConfigurationReview.tsx +++ b/src/components/Create/components/pages/ReviewDeploy/components/FundingConfigurationReview/FundingConfigurationReview.tsx @@ -1,7 +1,7 @@ import { t, Trans } from '@lingui/macro' import { Tooltip } from 'antd' import { CreateFlowPayoutsTable } from '../../../PayoutsPage/components/CreateFlowPayoutsTable' -import { ReviewDescription } from '../ReviewDescription/ReviewDescription' +import { ReviewDescription } from '../ReviewDescription' import { useFundingConfigurationReview } from './hooks/useFundingConfigurationReview' export const FundingConfigurationReview = () => { diff --git a/src/components/Create/components/pages/ReviewDeploy/components/ProjectDetailsReview/ProjectDetailsReview.tsx b/src/components/Create/components/pages/ReviewDeploy/components/ProjectDetailsReview/ProjectDetailsReview.tsx index 6f76f0f40e..b8e44e7215 100644 --- a/src/components/Create/components/pages/ReviewDeploy/components/ProjectDetailsReview/ProjectDetailsReview.tsx +++ b/src/components/Create/components/pages/ReviewDeploy/components/ProjectDetailsReview/ProjectDetailsReview.tsx @@ -13,7 +13,7 @@ import { featureFlagEnabled } from 'utils/featureFlags' import { parseWad } from 'utils/format/formatNumber' import { ipfsUriToGatewayUrl } from 'utils/ipfs' import { wrapNonAnchorsInAnchor } from 'utils/wrapNonAnchorsInAnchor' -import { ReviewDescription } from '../ReviewDescription/ReviewDescription' +import { ReviewDescription } from '../ReviewDescription' export const ProjectDetailsReview = () => { const { userAddress } = useWallet() diff --git a/src/components/Create/components/pages/ReviewDeploy/components/ProjectTokenReview/ProjectTokenReview.tsx b/src/components/Create/components/pages/ReviewDeploy/components/ProjectTokenReview/ProjectTokenReview.tsx index fecf8096f3..e39072474d 100644 --- a/src/components/Create/components/pages/ReviewDeploy/components/ProjectTokenReview/ProjectTokenReview.tsx +++ b/src/components/Create/components/pages/ReviewDeploy/components/ProjectTokenReview/ProjectTokenReview.tsx @@ -1,4 +1,5 @@ import { t } from '@lingui/macro' +import { ReservedTokensList } from 'components/v2v3/shared/ReservedTokensList' import { formatAmount } from 'utils/format/formatAmount' import { formatDiscountRate, @@ -6,9 +7,8 @@ import { formatRedemptionRate, formatReservedRate, } from 'utils/v2v3/math' -import { ReservedTokensList } from '../../../ProjectToken/components/CustomTokenSettings/components/ReservedTokensList/ReservedTokensList' import * as ProjectTokenForm from '../../../ProjectToken/hooks/useProjectTokenForm' -import { ReviewDescription } from '../ReviewDescription/ReviewDescription' +import { ReviewDescription } from '../ReviewDescription' import { useProjectTokenReview } from './hooks/useProjectTokenReview' export const ProjectTokenReview = () => { diff --git a/src/components/Create/components/pages/ReviewDeploy/components/ReviewDescription/ReviewDescription.tsx b/src/components/Create/components/pages/ReviewDeploy/components/ReviewDescription.tsx similarity index 100% rename from src/components/Create/components/pages/ReviewDeploy/components/ReviewDescription/ReviewDescription.tsx rename to src/components/Create/components/pages/ReviewDeploy/components/ReviewDescription.tsx diff --git a/src/components/Create/components/pages/ReviewDeploy/components/RewardsReview/RewardsReview.tsx b/src/components/Create/components/pages/ReviewDeploy/components/RewardsReview/RewardsReview.tsx index a93c820aea..1cec19eb88 100644 --- a/src/components/Create/components/pages/ReviewDeploy/components/RewardsReview/RewardsReview.tsx +++ b/src/components/Create/components/pages/ReviewDeploy/components/RewardsReview/RewardsReview.tsx @@ -7,7 +7,7 @@ import { useAppSelector } from 'redux/hooks/useAppSelector' import { editingV2ProjectActions } from 'redux/slices/editingV2Project' import { formatEnabled } from 'utils/format/formatBoolean' import { v4 } from 'uuid' -import { ReviewDescription } from '../ReviewDescription/ReviewDescription' +import { ReviewDescription } from '../ReviewDescription' export const RewardsReview = () => { const { diff --git a/src/components/Create/components/pages/ReviewDeploy/components/RulesReview/RulesReview.tsx b/src/components/Create/components/pages/ReviewDeploy/components/RulesReview/RulesReview.tsx index 2f0a9426b6..b7a809b7d0 100644 --- a/src/components/Create/components/pages/ReviewDeploy/components/RulesReview/RulesReview.tsx +++ b/src/components/Create/components/pages/ReviewDeploy/components/RulesReview/RulesReview.tsx @@ -1,6 +1,6 @@ import { t } from '@lingui/macro' import EthereumAddress from 'components/EthereumAddress' -import { ReviewDescription } from '../ReviewDescription/ReviewDescription' +import { ReviewDescription } from '../ReviewDescription' import { useRulesReview } from './hooks/useRulesReview' export const RulesReview = () => { diff --git a/src/components/NftRewards/AddNftCollectionForm/AddNftCollectionForm.tsx b/src/components/NftRewards/AddNftCollectionForm/AddNftCollectionForm.tsx index d750683761..aa86cdca35 100644 --- a/src/components/NftRewards/AddNftCollectionForm/AddNftCollectionForm.tsx +++ b/src/components/NftRewards/AddNftCollectionForm/AddNftCollectionForm.tsx @@ -11,7 +11,7 @@ import { inputMustExistRule } from 'utils/antdRules' import { helpPagePath } from 'utils/routes' import { CreateBadge } from '../../Create/components/CreateBadge' import { CreateCollapse } from '../../Create/components/CreateCollapse/CreateCollapse' -import { OptionalHeader } from '../../Create/components/OptionalHeader/OptionalHeader' +import { OptionalHeader } from '../../Create/components/OptionalHeader' import { RewardsList } from '../RewardsList/RewardsList' import { NftAdvancedFormItems } from './NftAdvancedFormItems' import { NftPaymentSuccessFormItems } from './NftPaymentSuccessFormItems' diff --git a/src/components/NftRewards/RewardsList/AddEditRewardModal.tsx b/src/components/NftRewards/RewardsList/AddEditRewardModal.tsx index 78e5576572..bd07dc3fd9 100644 --- a/src/components/NftRewards/RewardsList/AddEditRewardModal.tsx +++ b/src/components/NftRewards/RewardsList/AddEditRewardModal.tsx @@ -29,7 +29,7 @@ import { withHttps } from 'utils/externalLink' import { ipfsGatewayUrl } from 'utils/ipfs' import { V2V3_CURRENCY_USD } from 'utils/v2v3/currency' import { CreateCollapse } from '../../Create/components/CreateCollapse/CreateCollapse' -import { OptionalHeader } from '../../Create/components/OptionalHeader/OptionalHeader' +import { OptionalHeader } from '../../Create/components/OptionalHeader' interface AddEditRewardModalFormProps { fileUrl: string diff --git a/src/components/v2v3/V2V3Project/V2V3FundingCycleSection/modals/DistributePayoutsModal.tsx b/src/components/v2v3/V2V3Project/V2V3FundingCycleSection/modals/DistributePayoutsModal.tsx index 3ca745e85e..5b35bd031a 100644 --- a/src/components/v2v3/V2V3Project/V2V3FundingCycleSection/modals/DistributePayoutsModal.tsx +++ b/src/components/v2v3/V2V3Project/V2V3FundingCycleSection/modals/DistributePayoutsModal.tsx @@ -5,6 +5,7 @@ import { Callout } from 'components/Callout/Callout' import FormattedNumberInput from 'components/inputs/FormattedNumberInput' import TransactionModal from 'components/modals/TransactionModal' import { FEES_EXPLANATION } from 'components/strings' +import { PayoutsTable } from 'components/v2v3/shared/PayoutsTable/PayoutsTable' import { V2V3ProjectContext } from 'contexts/v2v3/Project/V2V3ProjectContext' import { BigNumber } from 'ethers' import { useCurrencyConverter } from 'hooks/useCurrencyConverter' @@ -13,7 +14,6 @@ import { V2V3CurrencyOption } from 'models/v2v3/currencyOption' import { useContext, useEffect, useState } from 'react' import { fromWad, parseWad } from 'utils/format/formatNumber' import { V2V3_CURRENCY_USD, V2V3CurrencyName } from 'utils/v2v3/currency' -import PayoutsTable from '../../V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable' export default function DistributePayoutsModal({ open, diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCyclePage.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCyclePage.tsx index 25048b03bc..e8ee65babd 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCyclePage.tsx +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCyclePage.tsx @@ -11,7 +11,7 @@ import { helpPagePath, settingsPagePath } from 'utils/routes' import { DetailsSection } from './DetailsSection' import { useEditCycleFormContext } from './EditCycleFormContext' import EditCycleFormSection from './EditCycleFormSection' -import { PayoutsSection } from './PayoutsSection' +import { PayoutsSection } from './PayoutsSection/PayoutsSection' import { ReviewConfirmModal } from './ReviewConfirmModal' import { TokensSection } from './TokensSection' import { useEditCycleFormHasError } from './hooks/useEditCycleFormHasError' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsSection.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsSection.tsx index 624355af71..447ea4d1c1 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsSection.tsx +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsSection.tsx @@ -2,11 +2,11 @@ import { Trans } from '@lingui/macro' import { Form } from 'antd' import { useWatch } from 'antd/lib/form/Form' import { JuiceSwitch } from 'components/inputs/JuiceSwitch' +import { PayoutsTable } from 'components/v2v3/shared/PayoutsTable/PayoutsTable' import { CurrencyName } from 'constants/currency' import { Split } from 'models/splits' import { AdvancedDropdown } from '../AdvancedDropdown' import { useEditCycleFormContext } from '../EditCycleFormContext' -import PayoutsTable from './PayoutsTable' export function PayoutsSection() { const { editCycleForm } = useEditCycleFormContext() diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/index.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/index.tsx deleted file mode 100644 index f2ba42de8c..0000000000 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import { PayoutsTable } from './PayoutsTable' - -export default PayoutsTable diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/index.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/index.tsx deleted file mode 100644 index 0dce68fed9..0000000000 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export * from './PayoutsSection' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReservedTokensSettingsPage/V2V3EditReservedTokens.tsx b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReservedTokensSettingsPage/V2V3EditReservedTokens.tsx index fb9fb4a7b7..e4f141c577 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReservedTokensSettingsPage/V2V3EditReservedTokens.tsx +++ b/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/ReservedTokensSettingsPage/V2V3EditReservedTokens.tsx @@ -1,8 +1,8 @@ import { Trans } from '@lingui/macro' import { Callout } from 'components/Callout/Callout' -import { ReservedTokensList } from 'components/Create/components/pages/ProjectToken/components/CustomTokenSettings/components/ReservedTokensList/ReservedTokensList' import { CsvUpload } from 'components/inputs/CsvUpload' import { AllocationSplit } from 'components/v2v3/shared/Allocation/Allocation' +import { ReservedTokensList } from 'components/v2v3/shared/ReservedTokensList' import { Split } from 'models/splits' import { useCallback } from 'react' import { parseV2SplitsCsv } from 'utils/csv' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/CurrencySwitcher.tsx b/src/components/v2v3/shared/PayoutsTable/CurrencySwitcher.tsx similarity index 97% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/CurrencySwitcher.tsx rename to src/components/v2v3/shared/PayoutsTable/CurrencySwitcher.tsx index f21dbc3405..9fc58b9fb5 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/CurrencySwitcher.tsx +++ b/src/components/v2v3/shared/PayoutsTable/CurrencySwitcher.tsx @@ -5,12 +5,12 @@ import { useCurrencyConverter } from 'hooks/useCurrencyConverter' import round from 'lodash/round' import { fromWad, parseWad } from 'utils/format/formatNumber' import { V2V3_CURRENCY_ETH, V2V3_CURRENCY_USD } from 'utils/v2v3/currency' -import { usePayoutsTable } from '../hooks/usePayoutsTable' import { payoutsTableMenuItemsIconClass, payoutsTableMenuItemsLabelClass, } from './PayoutTableSettings' import { usePayoutsTableContext } from './context/PayoutsTableContext' +import { usePayoutsTable } from './hooks/usePayoutsTable' export function CurrencySwitcher() { const { setCurrency: setCurrencyName } = usePayoutsTableContext() diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/HeaderRows.tsx b/src/components/v2v3/shared/PayoutsTable/HeaderRows.tsx similarity index 98% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/HeaderRows.tsx rename to src/components/v2v3/shared/PayoutsTable/HeaderRows.tsx index 0506a91070..9fb6badee6 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/HeaderRows.tsx +++ b/src/components/v2v3/shared/PayoutsTable/HeaderRows.tsx @@ -1,6 +1,5 @@ import { PlusOutlined } from '@ant-design/icons' import { Trans } from '@lingui/macro' - import { Button } from 'antd' import { ExternalLinkWithIcon } from 'components/v2v3/V2V3Project/ProjectDashboard/components/ui/ExternalLinkWithIcon' import { @@ -9,10 +8,10 @@ import { } from 'components/v2v3/shared/Allocation/AddEditAllocationModal' import { useState } from 'react' import { helpPagePath } from 'utils/routes' -import { usePayoutsTable } from '../hooks/usePayoutsTable' import { PayoutTableSettings } from './PayoutTableSettings' import { PayoutsTableCell } from './PayoutsTableCell' import { usePayoutsTableContext } from './context/PayoutsTableContext' +import { usePayoutsTable } from './hooks/usePayoutsTable' export function HeaderRows() { const [addRecipientModalOpen, setAddRecipientModalOpen] = useState() diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRow.tsx b/src/components/v2v3/shared/PayoutsTable/PayoutSplitRow.tsx similarity index 98% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRow.tsx rename to src/components/v2v3/shared/PayoutsTable/PayoutSplitRow.tsx index 9e48b4bbcf..01bc47b16d 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRow.tsx +++ b/src/components/v2v3/shared/PayoutsTable/PayoutSplitRow.tsx @@ -6,12 +6,12 @@ import { import round from 'lodash/round' import { Split } from 'models/splits' import { useState } from 'react' -import { usePayoutsTable } from '../hooks/usePayoutsTable' import { PayoutSplitRowMenu } from './PayoutSplitRowMenu' import { PayoutTitle } from './PayoutTitle' import { PayoutsTableCell } from './PayoutsTableCell' import { PayoutsTableRow } from './PayoutsTableRow' import { usePayoutsTableContext } from './context/PayoutsTableContext' +import { usePayoutsTable } from './hooks/usePayoutsTable' const Cell = PayoutsTableCell diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRowMenu.tsx b/src/components/v2v3/shared/PayoutsTable/PayoutSplitRowMenu.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutSplitRowMenu.tsx rename to src/components/v2v3/shared/PayoutsTable/PayoutSplitRowMenu.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutTableSettings.tsx b/src/components/v2v3/shared/PayoutsTable/PayoutTableSettings.tsx similarity index 98% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutTableSettings.tsx rename to src/components/v2v3/shared/PayoutsTable/PayoutTableSettings.tsx index 740008ee0d..a08ca44f40 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutTableSettings.tsx +++ b/src/components/v2v3/shared/PayoutsTable/PayoutTableSettings.tsx @@ -6,7 +6,7 @@ import { handleConfirmationDeletion } from 'components/v2v3/V2V3Project/ProjectD import { useState } from 'react' import { ReduxDistributionLimit } from 'redux/hooks/useEditingDistributionLimit' import { fromWad } from 'utils/format/formatNumber' -import { usePayoutsTable } from '../hooks/usePayoutsTable' +import { usePayoutsTable } from './hooks/usePayoutsTable' import { SwitchToUnlimitedModal } from './modals/SwitchToUnlimitedModal' export const payoutsTableMenuItemsLabelClass = 'flex gap-2 items-center text-sm' diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutTitle.tsx b/src/components/v2v3/shared/PayoutsTable/PayoutTitle.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutTitle.tsx rename to src/components/v2v3/shared/PayoutsTable/PayoutTitle.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTable.tsx b/src/components/v2v3/shared/PayoutsTable/PayoutsTable.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTable.tsx rename to src/components/v2v3/shared/PayoutsTable/PayoutsTable.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableBody.tsx b/src/components/v2v3/shared/PayoutsTable/PayoutsTableBody.tsx similarity index 98% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableBody.tsx rename to src/components/v2v3/shared/PayoutsTable/PayoutsTableBody.tsx index 4bc1131f60..a64d4d6af8 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableBody.tsx +++ b/src/components/v2v3/shared/PayoutsTable/PayoutsTableBody.tsx @@ -3,7 +3,6 @@ import { Form } from 'antd' import { Allocation } from 'components/v2v3/shared/Allocation/Allocation' import { twMerge } from 'tailwind-merge' import { getV2V3CurrencyOption } from 'utils/v2v3/currency' -import { usePayoutsTable } from '../hooks/usePayoutsTable' import { CurrencySwitcher } from './CurrencySwitcher' import { HeaderRows } from './HeaderRows' import { PayoutSplitRow } from './PayoutSplitRow' @@ -11,6 +10,7 @@ import { PayoutsTableCell } from './PayoutsTableCell' import { PayoutsTableRow } from './PayoutsTableRow' import { TotalRows } from './TotalRows' import { usePayoutsTableContext } from './context/PayoutsTableContext' +import { usePayoutsTable } from './hooks/usePayoutsTable' const Row = PayoutsTableRow const Cell = PayoutsTableCell diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableCell.tsx b/src/components/v2v3/shared/PayoutsTable/PayoutsTableCell.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableCell.tsx rename to src/components/v2v3/shared/PayoutsTable/PayoutsTableCell.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableRow.tsx b/src/components/v2v3/shared/PayoutsTable/PayoutsTableRow.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/PayoutsTableRow.tsx rename to src/components/v2v3/shared/PayoutsTable/PayoutsTableRow.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/TotalRows.tsx b/src/components/v2v3/shared/PayoutsTable/TotalRows.tsx similarity index 97% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/TotalRows.tsx rename to src/components/v2v3/shared/PayoutsTable/TotalRows.tsx index 234fd9b943..3533fb4af8 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/TotalRows.tsx +++ b/src/components/v2v3/shared/PayoutsTable/TotalRows.tsx @@ -2,9 +2,9 @@ import { Trans, t } from '@lingui/macro' import { Tooltip } from 'antd' import TooltipLabel from 'components/TooltipLabel' import round from 'lodash/round' -import { usePayoutsTable } from '../hooks/usePayoutsTable' import { PayoutsTableCell } from './PayoutsTableCell' import { PayoutsTableRow } from './PayoutsTableRow' +import { usePayoutsTable } from './hooks/usePayoutsTable' const Row = PayoutsTableRow const Cell = PayoutsTableCell diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/context/PayoutsTableContext.tsx b/src/components/v2v3/shared/PayoutsTable/context/PayoutsTableContext.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/context/PayoutsTableContext.tsx rename to src/components/v2v3/shared/PayoutsTable/context/PayoutsTableContext.tsx diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/hooks/usePayoutsTable.tsx b/src/components/v2v3/shared/PayoutsTable/hooks/usePayoutsTable.tsx similarity index 98% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/hooks/usePayoutsTable.tsx rename to src/components/v2v3/shared/PayoutsTable/hooks/usePayoutsTable.tsx index 4e8a9da7bb..585af34e16 100644 --- a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/hooks/usePayoutsTable.tsx +++ b/src/components/v2v3/shared/PayoutsTable/hooks/usePayoutsTable.tsx @@ -27,8 +27,8 @@ import { getNewDistributionLimit, } from 'utils/v2v3/distributions' import { MAX_DISTRIBUTION_LIMIT, SPLITS_TOTAL_PERCENT } from 'utils/v2v3/math' -import { useEditCycleFormContext } from '../../EditCycleFormContext' -import { usePayoutsTableContext } from '../PayoutsTable/context/PayoutsTableContext' +import { useEditCycleFormContext } from '../../../V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/EditCycleFormContext' +import { usePayoutsTableContext } from '../context/PayoutsTableContext' export const usePayoutsTable = () => { const { diff --git a/src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/modals/SwitchToUnlimitedModal.tsx b/src/components/v2v3/shared/PayoutsTable/modals/SwitchToUnlimitedModal.tsx similarity index 100% rename from src/components/v2v3/V2V3Project/V2V3ProjectSettings/pages/EditCyclePage/PayoutsSection/PayoutsTable/modals/SwitchToUnlimitedModal.tsx rename to src/components/v2v3/shared/PayoutsTable/modals/SwitchToUnlimitedModal.tsx diff --git a/src/components/Create/components/pages/ProjectToken/components/CustomTokenSettings/components/ReservedTokensList/ReservedTokensList.tsx b/src/components/v2v3/shared/ReservedTokensList.tsx similarity index 100% rename from src/components/Create/components/pages/ProjectToken/components/CustomTokenSettings/components/ReservedTokensList/ReservedTokensList.tsx rename to src/components/v2v3/shared/ReservedTokensList.tsx