Files
uiogaming.no/src/components/sections/header.js
T
LBlend aec4a9406e initial translation support
I should've divided this into multiple commits but oh well. This is just initial as there are still parts that needs to be done. Particularly user generated content needs to be translated somehow. See issue #45 for more info
2024-03-13 02:36:31 +01:00

39 lines
893 B
JavaScript

import * as React from "react"
import * as styles from "./header.module.css"
import { graphql, useStaticQuery } from "gatsby"
import { GatsbyImage } from "gatsby-plugin-image"
import { useTranslation } from "gatsby-plugin-react-i18next"
const Header = () => {
const data = useStaticQuery(graphql`
query {
placeholder: file(relativePath: { eq: "logo.jpg" }) {
childImageSharp {
gatsbyImageData(
placeholder: BLURRED
transformOptions: { fit: CONTAIN }
width: 256
)
}
}
}
`)
const { t } = useTranslation()
return (
<header id="hjem" className={styles.container}>
<GatsbyImage
image={data.placeholder.childImageSharp.gatsbyImageData}
alt="UiO Gaming logo"
/>
<h1>UiO Gaming</h1>
<p>{t("header.text")}</p>
</header>
)
}
export default Header