import "./App.css"; import React, { Suspense, lazy } from "react"; import { BrowserRouter as Router, Redirect, Route, Switch, } from "react-router-dom"; import { LanguageProvider } from "./component/Language/LanguageProvider"; import NavbarComponent, { navOnload, navOnresize } from "./component/Navbar"; import SidebarComponent, { sidebarOnload, sidebarOnresize, } from "./component/Sidebar"; const Home = lazy(() => import("./routes/Home")); const Projects = lazy(() => import("./routes/Projects")); const Contact = lazy(() => import("./routes/Contact")); export default function App() { return ( }> ); } window.onload = () => { navOnload(); sidebarOnload(); }; window.onresize = () => { navOnresize(); sidebarOnresize(); };