Skip to content

Commit 48bf113

Browse files
[docs] Add a temporary hiring block in the docs (mui#25111)
1 parent 828fa54 commit 48bf113

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

docs/public/static/hiring-toc.png

10.5 KB
Loading

docs/src/modules/components/AppTableOfContents.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import clsx from 'clsx';
66
import { useSelector } from 'react-redux';
77
import { makeStyles } from '@material-ui/core/styles';
88
import Typography from '@material-ui/core/Typography';
9+
import NoSsr from '@material-ui/core/NoSsr';
910
import Link from 'docs/src/modules/components/Link';
1011
import PageContext from 'docs/src/modules/components/PageContext';
1112

@@ -52,6 +53,19 @@ const useStyles = makeStyles((theme) => ({
5253
paddingLeft: theme.spacing(2.5),
5354
},
5455
active: {},
56+
hiring: {
57+
color: theme.palette.text.secondary,
58+
marginTop: theme.spacing(3),
59+
display: 'block',
60+
'& img': {
61+
display: 'block',
62+
},
63+
},
64+
hiringLearn: {
65+
display: 'block',
66+
marginTop: theme.spacing(0.5),
67+
color: theme.palette.text.primary,
68+
},
5569
}));
5670

5771
// TODO: these nodes are mutable sources. Use createMutableSource once it's stable
@@ -97,6 +111,9 @@ function useThrottledOnScroll(callback, delay) {
97111
}, [throttledCallback]);
98112
}
99113

114+
const timezone = (new Date().getTimezoneOffset() / 60) * -1;
115+
const noShow = Math.random() >= 0.2;
116+
100117
export default function AppTableOfContents(props) {
101118
const { items } = props;
102119
const classes = useStyles();
@@ -220,6 +237,16 @@ export default function AppTableOfContents(props) {
220237
</li>
221238
))}
222239
</Typography>
240+
<NoSsr>
241+
{(timezone >= 5 && timezone <= 6) || noShow ? null : (
242+
<Link href="/company/careers/" underline="none" className={classes.hiring}>
243+
<img src="/static/hiring-toc.png" alt="" loading="lazy" width={159} height={119} />
244+
{'We are hiring a Lead designer and two React engineers'}
245+
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
246+
<span className={classes.hiringLearn}>Learn more &rarr;</span>
247+
</Link>
248+
)}
249+
</NoSsr>
223250
</React.Fragment>
224251
) : null}
225252
</nav>

0 commit comments

Comments
 (0)