-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[docs-infra] Automatically hide Black Friday banner #44630
[docs-infra] Automatically hide Black Friday banner #44630
Conversation
Netlify deploy previewhttps://deploy-preview-44630--material-ui.netlify.app/ Bundle size report |
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.
Nice! Thanks for tackling this 🙌
|
||
function isBlackFriday() { | ||
const today = Date.now(); | ||
const start = new Date('2024-11-25').getTime(); |
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 merged this too quickly, it will create an hydration error and a CLS after the Black Friday date expires. Better have the layout shift during to draw people's attention.
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.
Handling it in #44632
Fix the regressions from #44565.
For the end date I used this https://github.com/mui/mui-private/blob/68478c35560439e13c946b8e8d6c0cb932f53632/web/src/modules/components/marketing/black-friday-2024/useBlackFriday2024.ts#L40