import type { ReactElement } from "react";
import "./App.css";

import Layout from "./components/Layout";
import Home from "./pages/Home";
import Stream from "./pages/Stream";
import Contact from "./pages/Contact";
import Portfolio from "./pages/Portfolio";

export default function App(): ReactElement {
    const path = window.location.pathname.toLowerCase();

    let content: ReactElement = <Home />;
    if (path === "/stream") {
        content = <Stream />;
    }

    if (path === "/contact") {
        content = <Contact />;
    }

    if (path === "/portfolio") {
        content = <Portfolio />;
    }

    return <Layout>{content}</Layout>;
}
