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

Refactor: move account modals to separate file #202

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ChristiaanScheermeijer
Copy link
Member

Description

Proposal refactor for the account modals. When separating the modals definition and modal component, it becomes easier to change/remove/add certain account modals.

This also applies lazy loading which means that the modals only are loaded when when rendered.


return (
<Dialog size={dialogSize} open={!!viewParam} onClose={closeHandler}>
{shouldShowBanner && banner && (
{!shouldShowBanner && banner && (

Choose a reason for hiding this comment

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

Why is this shouldShowBanner condition reversed?

@langemike
Copy link

Looks promising. I have one inline question. Tests are failing, but your PR is still in draft

<div className={styles.banner}>
<img src={banner} alt="" />
</div>
)}
{renderForm()}
<Suspense fallback={fallback}>{renderForm()}</Suspense>
Copy link

@royschut royschut Jan 30, 2025

Choose a reason for hiding this comment

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

Minor: we don't need a function anymore. Maybe just a boolean for the !user etc fallback, or render currentModal.component.

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.

3 participants