-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
[2/2] Cleanup Create/Settings NFT tech debt #4066
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
…FT form and related components
c69ec89
to
2b5e79d
Compare
/> | ||
} | ||
/> | ||
<TransactionModal transactionPending open={launchTxPending} /> |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
2882754
to
b613d22
Compare
import { CreateCollapse } from '../../Create/components/CreateCollapse' | ||
import { OptionalHeader } from '../../Create/components/OptionalHeader' |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 = () => { |
There was a problem hiding this comment.
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 = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion maybe simply useLaunchNftsForm
There was a problem hiding this 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!
b613d22
to
fb73c0e
Compare
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 sharedNftRewards
directoryMoves create flow logic out of
AddNftCollectionForm
(shared component) into newNftRewardsPage
(create flow specific component)Changes name of
useNftRewardsForm
hook touseCreateFlowNftRewardsForm
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 theuseSettingsLaunchNftsForm