-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2/2] Cleanup Create/Settings NFT tech debt (#4066)
- Loading branch information
1 parent
9602353
commit fd83cc8
Showing
27 changed files
with
234 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/components/Create/components/pages/NftRewards/NftRewardsPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { AddNftCollectionForm } from 'components/NftRewards/AddNftCollectionForm' | ||
import { CREATE_FLOW } from 'constants/fathomEvents' | ||
import { trackFathomGoal } from 'lib/fathom' | ||
import { useContext } from 'react' | ||
import { useSetCreateFurthestPageReached } from 'redux/hooks/useEditingCreateFurthestPageReached' | ||
import { Wizard } from '../../Wizard' | ||
import { PageContext } from '../../Wizard/contexts/PageContext' | ||
import { useCreateFlowNftRewardsForm } from './hooks' | ||
|
||
export function NftRewardsPage() { | ||
const { goToNextPage } = useContext(PageContext) | ||
|
||
const { form, initialValues } = useCreateFlowNftRewardsForm() | ||
useSetCreateFurthestPageReached('nftRewards') | ||
|
||
return ( | ||
<AddNftCollectionForm | ||
form={form} | ||
initialValues={initialValues} | ||
okButton={<Wizard.Page.ButtonControl />} | ||
onFinish={() => { | ||
goToNextPage?.() | ||
trackFathomGoal(CREATE_FLOW.NFT_NEXT_CTA) | ||
}} | ||
/> | ||
) | ||
} |
2 changes: 1 addition & 1 deletion
2
src/components/Create/components/pages/NftRewards/hooks/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './useNftRewardsForm' | ||
export * from './useCreateFlowNftRewardsForm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './AddNftCollectionForm' | ||
export * from './NftRewardsPage' |
2 changes: 1 addition & 1 deletion
2
...omponents/Create/components/pages/ReviewDeploy/components/RewardsReview/RewardsReview.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './AddNftCollectionForm' |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...v3/V2V3Project/V2V3ProjectSettings/pages/EditNftsPage/hooks/useUpdateCurrentCollection.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 47 additions & 5 deletions
52
...ct/V2V3ProjectSettings/pages/NewEditNftsPage/LaunchNftCollection/LaunchNftsCollection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,52 @@ | ||
import { AddNftCollectionForm } from 'components/Create/components' | ||
import { UploadAndLaunchNftsButton } from './UploadAndLaunchNftsButton' | ||
import { Trans } from '@lingui/macro' | ||
import { Button } from 'antd' | ||
import { AddNftCollectionForm } from 'components/NftRewards/AddNftCollectionForm' | ||
import TransactionModal from 'components/modals/TransactionModal' | ||
import { TransactionSuccessModal } from '../../../TransactionSuccessModal' | ||
import { useLaunchNftsForm } from './hooks/useLaunchNftsForm' | ||
|
||
export function LaunchNftsPage() { | ||
const { | ||
form, | ||
launchCollection, | ||
launchButtonLoading, | ||
launchTxPending, | ||
successModalOpen, | ||
setSuccessModalOpen, | ||
} = useLaunchNftsForm() | ||
return ( | ||
<AddNftCollectionForm | ||
okButton={<UploadAndLaunchNftsButton className="mt-10" />} | ||
/> | ||
<> | ||
<AddNftCollectionForm | ||
form={form} | ||
okButton={ | ||
<Button | ||
type="primary" | ||
onClick={launchCollection} | ||
loading={launchButtonLoading} | ||
className="mt-10" | ||
> | ||
<Trans>Deploy NFT collection</Trans> | ||
</Button> | ||
} | ||
/> | ||
<TransactionModal transactionPending open={launchTxPending} /> | ||
<TransactionSuccessModal | ||
open={successModalOpen} | ||
onClose={() => setSuccessModalOpen(false)} | ||
content={ | ||
<> | ||
<div className="w-80 pt-1 text-2xl font-medium"> | ||
<Trans>Your new NFTs have been deployed</Trans> | ||
</div> | ||
<div className="text-secondary pb-6"> | ||
<Trans> | ||
New NFTs will be available in your next cycle as long as it | ||
starts after your edit deadline. | ||
</Trans> | ||
</div> | ||
</> | ||
} | ||
/> | ||
</> | ||
) | ||
} |
121 changes: 0 additions & 121 deletions
121
...V3ProjectSettings/pages/NewEditNftsPage/LaunchNftCollection/UploadAndLaunchNftsButton.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.