Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2/2] Cleanup Create/Settings NFT tech debt #4066

Merged
merged 3 commits into from
Sep 14, 2023

Conversation

johnnyd-eth
Copy link
Contributor

  • The motivation for this PR was to fix a few bugs caused by the linkage of the AddNftCollectionForm across both settings and create:

  • Moves AddNftCollectionForm and any related components to the shared NftRewards directory

  • Moves create flow logic out of AddNftCollectionForm (shared component) into new NftRewardsPage (create flow specific component)

  • Changes name of useNftRewardsForm hook to useCreateFlowNftRewardsForm

  • Creates new useSettingsLaunchNftsForm hook which relies purely on the ant form rather than redux (as the create hook does)

  • Moves all logic inside the UploadAndLaunchNftsButton into the useSettingsLaunchNftsForm

@vercel
Copy link

vercel bot commented Sep 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
juice-interface-goerli ✅ Ready (Inspect) Visit Preview Sep 14, 2023 11:52am
1 Ignored Deployment
Name Status Preview Updated (UTC)
juice-interface ⬜️ Ignored (Inspect) Visit Preview Sep 14, 2023 11:52am

@johnnyd-eth johnnyd-eth changed the base branch from main to improve-add-nft-flow September 13, 2023 12:14
@johnnyd-eth johnnyd-eth changed the title Create/Settings NFT tech debt [2/2] Create/Settings NFT tech debt Sep 13, 2023
/>
}
/>
<TransactionModal transactionPending open={launchTxPending} />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move these modals from the button component into the page component

}) {
const [ipfsUploading, setIpfsUploading] = useState<boolean>(false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move all this shite into the new settings launch NFTs hook

@johnnyd-eth johnnyd-eth changed the title [2/2] Create/Settings NFT tech debt [2/2] Cleanup Create/Settings NFT tech debt Sep 13, 2023
@johnnyd-eth johnnyd-eth force-pushed the create-settings-nft-tech-debt branch from 2882754 to b613d22 Compare September 14, 2023 10:44
Comment on lines +29 to +30
import { CreateCollapse } from '../../Create/components/CreateCollapse'
import { OptionalHeader } from '../../Create/components/OptionalHeader'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion if these aren't create-flow specific, might we move them out to the parent dir?

Copy link
Contributor Author

@johnnyd-eth johnnyd-eth Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we should, was just keeping it mission critical for now - figured this would explode the diff. A tech-debt task for the future for sure

}
/>
</>
<Button
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sugestion: given this component now does nothing specific (its just a button!) is it worth even having? could we nuke?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call

}>

export const useNftRewardsForm = () => {
export const useCreateFlowNftRewardsForm = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (non-blocking) maybe this could be called "useNewProjectNftRewardsForm`

} from '../../../ReconfigureFundingCycleSettingsPage/hooks/useEditingFundingCycleConfig'
import { useReconfigureFundingCycle } from '../../../ReconfigureFundingCycleSettingsPage/hooks/useReconfigureFundingCycle'

export const useSettingsLaunchNftsForm = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion maybe simply useLaunchNftsForm

Copy link
Contributor

@tomquirk tomquirk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnnyd-eth fantastic clean up PR, thanks for a great description as well to orient me. Approved!

@johnnyd-eth johnnyd-eth force-pushed the create-settings-nft-tech-debt branch from b613d22 to fb73c0e Compare September 14, 2023 11:47
@johnnyd-eth johnnyd-eth merged commit fd83cc8 into improve-add-nft-flow Sep 14, 2023
@johnnyd-eth johnnyd-eth deleted the create-settings-nft-tech-debt branch September 14, 2023 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants