Skip to content

Commit

Permalink
[docs] Add Black Friday banner to docs (#44565)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanivan authored Nov 27, 2024
1 parent 9fab55d commit c23fe4a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions docs/src/components/banner/AppFrameBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export default function AppFrameBanner() {
// eslint-disable-next-line react-hooks/rules-of-hooks -- FEATURE_TOGGLE never changes
const pageContext = React.useContext(PageContext);
const productName = convertProductIdToName(pageContext) || 'MUI';
const message = `Influence ${productName}'s 2024 roadmap! Participate in the latest Developer Survey`;
const surveyMessage = `Influence ${productName}'s 2024 roadmap! Participate in the latest Developer Survey`;
const blackFridayMessage = `Black Friday is here! Don't miss out on the best offers of the year.`;

const showSurveyMessage = false;
const message = showSurveyMessage ? surveyMessage : blackFridayMessage;

if (process.env.NODE_ENV !== 'production') {
if (message.length > 100) {
Expand All @@ -26,7 +30,11 @@ export default function AppFrameBanner() {

return (
<Link
href="https://tally.so/r/3Ex4PN?source=docs-banner"
href={
showSurveyMessage
? 'https://tally.so/r/3Ex4PN?source=website'
: 'https://mui.com/store/bundles/?deal=black-friday&from=docs'
}
target="_blank"
variant="caption"
sx={[
Expand Down
2 changes: 1 addition & 1 deletion docs/src/featureToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
module.exports = {
enable_website_banner: false,
enable_toc_banner: true,
enable_docsnav_banner: false,
enable_docsnav_banner: true,
enable_job_banner: false,
};

0 comments on commit c23fe4a

Please sign in to comment.