Created the Header.jsx
This commit is contained in:
parent
fd91edc97a
commit
6eaa5e0540
17
client/src/common/components/Header/Header.jsx
Normal file
17
client/src/common/components/Header/Header.jsx
Normal 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>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user