2021-04-21 13:37:12 +00:00
|
|
|
import React, {useContext} from "react"
|
|
|
|
import LogoDark from "../media/LogoDark.png"
|
|
|
|
import LogoLight from "../media/LogoLight.png"
|
|
|
|
import ContextTheme from "../contexts/ContextTheme"
|
|
|
|
|
|
|
|
|
|
|
|
export default function Logo({ children, className, ...props }) {
|
2021-04-21 16:58:14 +00:00
|
|
|
const [theme, ] = useContext(ContextTheme)
|
2021-04-21 13:37:12 +00:00
|
|
|
|
|
|
|
let logo;
|
|
|
|
if(theme === "ThemeDark") {
|
|
|
|
logo = LogoDark
|
|
|
|
}
|
|
|
|
else if(theme === "ThemeLight") {
|
|
|
|
logo = LogoLight
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
throw new Error(`Unknown theme: ${theme}`)
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
2021-04-21 16:31:49 +00:00
|
|
|
<img src={logo} alt={"N.E.S.T."} {...props}/>
|
2021-04-21 13:37:12 +00:00
|
|
|
)
|
|
|
|
}
|