diff --git a/src/about/AboutPage.tsx b/src/about/AboutPage.tsx new file mode 100644 index 0000000..3b1da95 --- /dev/null +++ b/src/about/AboutPage.tsx @@ -0,0 +1,5 @@ +export default function AboutPage() { + return <> + Hello + +} \ No newline at end of file diff --git a/src/index.css b/src/index.scss similarity index 95% rename from src/index.css rename to src/index.scss index 2a9c3c8..7613969 100644 --- a/src/index.css +++ b/src/index.scss @@ -2,6 +2,7 @@ body { margin: 0; width: 100%; height: 100%; + background: black; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', diff --git a/src/index.tsx b/src/index.tsx index bbcda4d..fdf7519 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,12 +1,13 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; -import './index.css'; -import reportWebVitals from './reportWebVitals'; -import {Canvas} from "./index/Canvas"; -import {Nav} from "./nav/Nav"; +import './index.scss'; import {RouterProvider} from "./router/RouterContext"; import {Route} from "./router/Route"; +const Canvas = React.lazy(() => import("./index/Canvas")); +const About = React.lazy(() => import("./about/AboutPage")); +const Nav = React.lazy(() => import("./nav/Nav")); + const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); @@ -18,6 +19,9 @@ root.render( + + + ); @@ -25,4 +29,4 @@ root.render( // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); +//reportWebVitals(); diff --git a/src/index/Canvas.tsx b/src/index/Canvas.tsx index 314f9d6..55fd431 100644 --- a/src/index/Canvas.tsx +++ b/src/index/Canvas.tsx @@ -1,7 +1,7 @@ import {motion} from "framer-motion"; import "./canvas.scss"; -export function Canvas() { +export default function Canvas() { return (
diff --git a/src/nav/Nav.tsx b/src/nav/Nav.tsx index 407dbe9..a11263a 100644 --- a/src/nav/Nav.tsx +++ b/src/nav/Nav.tsx @@ -7,13 +7,14 @@ import "./nav.scss"; import {motion} from "framer-motion"; import {Link} from "../router/Link"; -export function Nav() { +export default function Nav() { const [active, setActive] = useState(false); return <>