Fix links to wrong homepage (#27)

* Upgrade dependencies

* Remove dark state from nav

* Fix flag linking to wrong homepage
This commit is contained in:
Lachlan Campbell 2020-07-13 18:30:27 -04:00 committed by GitHub
parent 5f4d49f338
commit 447d566885
4 changed files with 19 additions and 22 deletions

View file

@ -58,9 +58,9 @@ const Base = styled('a')`
`
const Flag = props => (
<Link href="/" passHref>
<Base title="Homepage" {...props} />
</Link>
// <Link href="/" passHref>
<Base href="https://hackclub.com/" title="Homepage" {...props} />
// </Link>
)
export default Flag

View file

@ -169,7 +169,6 @@ class Header extends Component {
}
static defaultProps = {
// dark: false,
color: 'white'
}
@ -181,9 +180,6 @@ class Header extends Component {
this.setState({ mobile: true, toggled: false })
})
}
if (window.location.pathname === '/') {
this.setState({ dark: true })
}
}
componentWillUnmount = () => {
@ -206,9 +202,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 = () => {
@ -218,17 +211,16 @@ class Header extends Component {
render() {
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 (
<Root

View file

@ -12,14 +12,14 @@
"dependencies": {
"@hackclub/icons": "^0.0.3",
"@hackclub/meta": "1.0.0",
"@hackclub/theme": "^0.1.1",
"@hackclub/theme": "^0.1.2",
"@mdx-js/loader": "^1.6.6",
"@next/mdx": "^9.4.4",
"@segment/snippet": "^4.12.0",
"airtable-plus": "^1.0.4",
"fathom-client": "^3.0.0",
"isomorphic-unfetch": "^3.0.0",
"lodash": "^4.17.15",
"lodash": "^4.17.19",
"next": "^9.4.4",
"react": "^16.13.1",
"react-dom": "^16.13.1",

View file

@ -1311,10 +1311,10 @@
resolved "https://registry.yarnpkg.com/@hackclub/meta/-/meta-1.0.0.tgz#421731bd87e8fdeb4cc33afd12d68c8266ce79ae"
integrity sha512-Xm1QgCxWAzG8ekV3xSf0gZ/6gCL4BuaKl3EjAy3e8QhoKDCjO7O4TtlfeUyLoJvIHzgYN/1sbZtkZ1VE6Pw5XA==
"@hackclub/theme@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@hackclub/theme/-/theme-0.1.1.tgz#b02672cc2f28094eb79a227e160cee935cc751fe"
integrity sha512-P8G0OcY22NnWK2SsGupYSMxd1ScbqSrTewPVjgWLcd1qgjTHEJBafWEF75B3Ru87CRco0wLiJi3bMmEBp1LT+A==
"@hackclub/theme@^0.1.2":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@hackclub/theme/-/theme-0.1.2.tgz#60dcf1a55f71fc3255fa4315ea77928d50d35a7c"
integrity sha512-LmyU/fPYX5v2hq2k4VeBV1cMxnB8/80LC+NMC3Ftxgu3jZIJpk9EQRStrksDfFGLuYSTFgB+Zqj6X06Z7tEYRQ==
"@mdx-js/loader@^1.6.6":
version "1.6.6"
@ -4412,11 +4412,16 @@ lodash.uniq@4.5.0, lodash.uniq@^4.5.0:
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
lodash@4.17.15, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.15:
lodash@4.17.15, lodash@^4.17.11, lodash@^4.17.13:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
lodash@^4.17.19:
version "4.17.19"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"