Remove laptop promotion

This commit is contained in:
Lachlan Campbell 2020-06-30 00:59:35 -04:00
parent 331324ed96
commit 4e468628c0

View file

@ -169,7 +169,6 @@ class Header extends Component {
}
static defaultProps = {
dark: false,
color: 'white'
}
@ -206,9 +205,6 @@ class Header extends Component {
if (newState !== oldState) {
this.setState({ scrolled: newState })
}
if (window.location.pathname === '/') {
this.setState({ dark: window.scrollY < document.body.clientHeight / 2 })
}
}
handleToggleMenu = () => {
@ -216,45 +212,20 @@ class Header extends Component {
}
render() {
const { color, fixed, bgColor, ...props } = this.props
const { color, fixed, bgColor, dark, ...props } = this.props
const { mobile, scrolled, toggled } = this.state
const dark = this.props.dark || this.state.dark
const baseColor = dark
? color || 'white'
: color === 'white' && scrolled
? 'black'
: color
? 'black'
: color
const toggleColor = dark
? color || 'snow'
: toggled || (color === 'white' && scrolled)
? 'slate'
: color
? 'slate'
: color
return [
<Box
sx={{
pt: 5,
pb: 3,
bg: 'dark',
color: 'white',
textAlign: 'center',
a: { color: 'inherit', fontWeight: 'bold' }
}}
key="blm"
>
<Container variant="copy">
<Text as="p">
<Link href="https://twitter.com/hackclub/status/1266565380820160514?s=21">
Black Lives Matter
</Link>
{'. Were sending '}
<Link href="https://twitter.com/lachlanjc/status/1269702361037058048?s=21">
laptops to 80&nbsp;Black & underserved teenagers
</Link>
.
</Text>
</Container>
</Box>,
return (
<Root
{...props}
key="nav"
@ -287,7 +258,7 @@ class Header extends Component {
/>
{toggled && <ScrollLock />}
</Root>
]
)
}
}