speice.io/pages/LayoutBase.tsx

32 lines
741 B
TypeScript
Raw Normal View History

2023-04-21 22:23:19 -04:00
import { PropsWithChildren, StrictMode } from "react";
2023-04-21 23:03:34 -04:00
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faHome, faUser } from "@fortawesome/free-solid-svg-icons";
2023-04-16 20:10:40 -04:00
import "./style.css";
2023-04-21 21:39:53 -04:00
const Navbar: React.FC = () => (
<span className="navbar">
2023-04-21 22:23:19 -04:00
<a href="/">
2023-04-21 23:03:34 -04:00
<FontAwesomeIcon icon={faHome} className="icon" />
2023-04-21 22:23:19 -04:00
Home
</a>
<span>/</span>
<a href="/about">
2023-04-21 23:03:34 -04:00
<FontAwesomeIcon icon={faUser} className="icon" />
2023-04-21 22:23:19 -04:00
About
</a>
2023-04-16 20:10:40 -04:00
</span>
);
const Layout: React.FC<PropsWithChildren> = ({ children }) => (
2023-04-21 22:23:19 -04:00
<StrictMode>
2023-04-21 23:03:34 -04:00
<div className="gridOffset">
<Navbar />
<hr style={{ marginTop: "0" }} />
{children}
</div>
2023-04-21 22:23:19 -04:00
</StrictMode>
2023-04-16 20:10:40 -04:00
);
export default Layout;