-
Notifications
You must be signed in to change notification settings - Fork 11
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
Conversation
app/(dashboard)/home/page.tsx
Outdated
actionRequired: number; | ||
}) => { | ||
if (response && response.total > 0) { | ||
setTotal(response.total); |
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.
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.
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.
let's remove if we're not using!
Screen.Recording.2024-07-15.at.2.12.16.PM.mov |
Signed-off-by: riquelme-stripe <[email protected]>
Signed-off-by: riquelme-stripe <[email protected]>
app/(dashboard)/home/page.tsx
Outdated
actionRequired: number; | ||
}) => { | ||
if (response && response.total > 0) { | ||
setTotal(response.total); |
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.
let's remove if we're not using!
app/(dashboard)/home/page.tsx
Outdated
{/* </Container> */} | ||
</div> | ||
|
||
{/* // end */} |
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.
remove comment?
app/(dashboard)/home/page.tsx
Outdated
onNotificationsChange={renderConditionallyCallback} | ||
/> | ||
</EmbeddedComponentContainer> | ||
{/* </Container> */} |
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.
remove comment?
app/(dashboard)/settings/page.tsx
Outdated
onNotificationsChange={renderConditionallyCallback} | ||
/> | ||
</EmbeddedComponentContainer> | ||
{/* </Container> */} |
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.
comment
…pe/stripe-connect-furever-demo into riquelme-notificationBannerCallback
@@ -20,17 +22,35 @@ export default function Dashboard() { | |||
|
|||
const BREAKPOINT = 1190; | |||
|
|||
const [showBanner, setShowBanner] = React.useState(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.
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
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.
I can open a new PR with this refactored
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