Created the Header.jsx

This commit is contained in:
Mathias Wagner 2023-05-30 18:13:20 +02:00
parent fd91edc97a
commit 6eaa5e0540
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -0,0 +1,17 @@
import "./styles.sass";
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import {faGear} from "@fortawesome/free-solid-svg-icons";
import {getByPath} from "@/common/routes";
import {useLocation} from "react-router-dom";
export const Header = () => {
const location = useLocation();
const path = getByPath(location.pathname);
return (
<div className="header">
<h1>{path.category} / <span>{path.name}</span></h1>
<FontAwesomeIcon icon={faGear} />
</div>
);
}