1
- import React , { useState } from 'react' ;
1
+ import React from 'react' ;
2
2
import PropTypes from "prop-types"
3
- import { Link , useI18next } from 'gatsby-plugin-react-i18next' ;
3
+ import { Link } from 'gatsby-plugin-react-i18next' ;
4
4
import { StaticImage } from "gatsby-plugin-image" ;
5
5
import styled from 'styled-components' ;
6
6
7
-
8
7
import SiteBorderStyles from '../styles/SiteBorderStyles' ;
9
8
import { CallToAction } from "./button" ;
9
+ import LanguageSwitcher from './language-switcher' ;
10
+
10
11
import { FiLinkedin , FiGithub } from 'react-icons/fi' ;
11
- import { SiAircanada } from 'react-icons/si'
12
- export default function Header ( ) {
13
- const [ isOn , setSwitcher ] = useState ( false ) ;
14
- const toggleSwitcher = ( ) => {
15
- setSwitcher ( ! isOn ) ;
16
- }
17
12
18
- const { languages , originalPath } = useI18next ( ) ;
13
+ export default function Header ( ) {
19
14
return (
20
15
< HeaderStyles >
21
16
< SiteBorderStyles >
@@ -31,32 +26,20 @@ export default function Header() {
31
26
</ div >
32
27
33
28
{ /* logo */ }
34
- { /* TODO: center logo */ }
35
29
< Link to = "/" >
36
30
< StaticImage
37
31
placeholder = "blurred"
38
- src = "../assets/images/coderbunker-logo-black .png"
32
+ src = "../assets/images/coderbunker_canada_logo .png"
39
33
alt = "Coderbunker Logo"
40
34
width = { 50 }
41
35
/>
42
36
</ Link >
43
37
44
-
45
- < ul className = "flex items-center" >
38
+ < ul className = "flex items-center text-lg" >
46
39
{ /* Language Switcher */ }
47
- < li className = { `flex items-center pr-2 md:px-4 ${ isOn ? "switched-on" : "switched-off" } ` } >
48
- < button onClick = { toggleSwitcher } aria-label = "Language Switcher" className = "p-2 relative" >
49
- < SiAircanada className = "text-2xl md:text-3xl" />
50
- </ button >
51
- { languages . map ( ( lng ) => (
52
- < div key = { lng } className = { `text-lg md:text-xl px-1 py-2 sm:p-2 ${ isOn ? "block" : "hidden" } ` } >
53
- < Link to = { originalPath } language = { lng } >
54
- { lng . toUpperCase ( ) }
55
- </ Link >
56
- </ div >
57
- ) ) }
58
- </ li >
40
+ < LanguageSwitcher />
59
41
42
+ { /* Red Retain Us Button */ }
60
43
< li >
61
44
< CallToAction />
62
45
</ li >
0 commit comments