fix and format
This commit is contained in:
parent
f45a2bcd3b
commit
818f984f7b
18 changed files with 268 additions and 254 deletions
|
|
@ -1,29 +1,29 @@
|
|||
'use client'
|
||||
"use client";
|
||||
|
||||
import { ThemeContext } from '@contexts/ThemeContext'
|
||||
import choraLogoDark from '../public/images/chora_dark_small.png'
|
||||
import choraLogoLight from '../public/images/chora_light_small.png'
|
||||
import ThemeButton from '@components/ThemeButton'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import { useContext } from 'react'
|
||||
import { ThemeContext } from "@contexts/ThemeContext";
|
||||
import choraLogoDark from "../public/images/chora_dark_small.png";
|
||||
import choraLogoLight from "../public/images/chora_light_small.png";
|
||||
import ThemeButton from "@components/ThemeButton";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useContext } from "react";
|
||||
|
||||
import styles from './Header.module.css'
|
||||
import styles from "./Header.module.css";
|
||||
|
||||
const Header = () => {
|
||||
const { darkTheme, setDarkTheme } = useContext(ThemeContext)
|
||||
const { darkTheme, setDarkTheme } = useContext(ThemeContext);
|
||||
|
||||
const toggleTheme = () => {
|
||||
if (darkTheme) {
|
||||
setDarkTheme(false)
|
||||
setDarkTheme(false);
|
||||
} else {
|
||||
setDarkTheme(true)
|
||||
setDarkTheme(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={styles.header}>
|
||||
<div style={{ display: 'none' }}>{darkTheme.toString()}</div>
|
||||
<div style={{ display: "none" }}>{darkTheme.toString()}</div>
|
||||
<div>
|
||||
<div className={styles.title}>
|
||||
<Link href="/">
|
||||
|
|
@ -31,32 +31,35 @@ const Header = () => {
|
|||
alt="chora studio"
|
||||
src={darkTheme ? choraLogoDark : choraLogoLight}
|
||||
/>
|
||||
<div>{'chora '}<span style={{ opacity: '0.75' }}>{'studio'}</span></div>
|
||||
<div>
|
||||
{"chora "}
|
||||
<span style={{ opacity: "0.75" }}>{"studio"}</span>
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
<div className={styles.menu}>
|
||||
<ul>
|
||||
<li>
|
||||
<Link href="/products">{'products'}</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/solutions">{'solutions'}</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/validator">{'validator'}</Link>
|
||||
</li>
|
||||
<li className={styles.divider}>{'|'}</li>
|
||||
<li>
|
||||
<Link href="https://blog.chora.studio" target="_blank">
|
||||
{'blog ↗'}
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>
|
||||
<Link href="/products">{"products"}</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/solutions">{"solutions"}</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/validator">{"validator"}</Link>
|
||||
</li>
|
||||
<li className={styles.divider}>{"|"}</li>
|
||||
<li>
|
||||
<Link href="https://blog.chora.studio" target="_blank">
|
||||
{"blog ↗"}
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
<ThemeButton darkTheme={darkTheme} toggleTheme={toggleTheme} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
export default Header
|
||||
export default Header;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue