@@ -6,6 +6,7 @@ import clsx from 'clsx';
6
6
import { useSelector } from 'react-redux' ;
7
7
import { makeStyles } from '@material-ui/core/styles' ;
8
8
import Typography from '@material-ui/core/Typography' ;
9
+ import NoSsr from '@material-ui/core/NoSsr' ;
9
10
import Link from 'docs/src/modules/components/Link' ;
10
11
import PageContext from 'docs/src/modules/components/PageContext' ;
11
12
@@ -52,6 +53,19 @@ const useStyles = makeStyles((theme) => ({
52
53
paddingLeft : theme . spacing ( 2.5 ) ,
53
54
} ,
54
55
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
+ } ,
55
69
} ) ) ;
56
70
57
71
// TODO: these nodes are mutable sources. Use createMutableSource once it's stable
@@ -97,6 +111,9 @@ function useThrottledOnScroll(callback, delay) {
97
111
} , [ throttledCallback ] ) ;
98
112
}
99
113
114
+ const timezone = ( new Date ( ) . getTimezoneOffset ( ) / 60 ) * - 1 ;
115
+ const noShow = Math . random ( ) >= 0.2 ;
116
+
100
117
export default function AppTableOfContents ( props ) {
101
118
const { items } = props ;
102
119
const classes = useStyles ( ) ;
@@ -220,6 +237,16 @@ export default function AppTableOfContents(props) {
220
237
</ li >
221
238
) ) }
222
239
</ 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 →</ span >
247
+ </ Link >
248
+ ) }
249
+ </ NoSsr >
223
250
</ React . Fragment >
224
251
) : null }
225
252
</ nav >
0 commit comments