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

Add Notification Banner Callback #179

Merged
merged 14 commits into from
Jul 16, 2024

Conversation

riquelme-stripe
Copy link
Contributor

Moves the Notification Banner to its own section and conditionally renders if notifications are present.

Screen.Recording.2024-07-15.at.12.59.42.PM.mov

actionRequired: number;
}) => {
if (response && response.total > 0) {
setTotal(response.total);
Copy link
Contributor Author

@riquelme-stripe riquelme-stripe Jul 15, 2024

Choose a reason for hiding this comment

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

Although we set the total value here, it's not actually used currently. I'm happy to remove this unless we want to keep it as an example.

Copy link
Contributor

Choose a reason for hiding this comment

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

let's remove if we're not using!

@riquelme-stripe
Copy link
Contributor Author

Screen.Recording.2024-07-15.at.2.12.16.PM.mov

actionRequired: number;
}) => {
if (response && response.total > 0) {
setTotal(response.total);
Copy link
Contributor

Choose a reason for hiding this comment

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

let's remove if we're not using!

{/* </Container> */}
</div>

{/* // end */}
Copy link
Contributor

Choose a reason for hiding this comment

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

remove comment?

onNotificationsChange={renderConditionallyCallback}
/>
</EmbeddedComponentContainer>
{/* </Container> */}
Copy link
Contributor

Choose a reason for hiding this comment

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

remove comment?

onNotificationsChange={renderConditionallyCallback}
/>
</EmbeddedComponentContainer>
{/* </Container> */}
Copy link
Contributor

Choose a reason for hiding this comment

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

comment

@riquelme-stripe riquelme-stripe merged commit 72ac54e into master Jul 16, 2024
2 checks passed
@riquelme-stripe riquelme-stripe deleted the riquelme-notificationBannerCallback branch July 16, 2024 16:12
@@ -20,17 +22,35 @@ export default function Dashboard() {

const BREAKPOINT = 1190;

const [showBanner, setShowBanner] = React.useState(false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see you've already merged this so it's no biggie, but in the future we can probably abstract all of this into its own component to avoid code duplication and easily use the notification banner if we want to add it to other places

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can open a new PR with this refactored

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