Astro app

This commit is contained in:
Alicia Sykes
2024-05-20 22:44:09 +01:00
parent 34ca09fc20
commit b090dcadb1
23 changed files with 513 additions and 48 deletions

View File

@@ -1,24 +1,34 @@
import { Routes, Route, Outlet } from "react-router-dom";
import { Routes, Route, Outlet } from 'react-router-dom';
import Home from 'web-check-live/views/Home.tsx';
import Results from 'web-check-live/views/Results.tsx';
import About from 'web-check-live/views/About.tsx';
import NotFound from 'web-check-live/views/NotFound.tsx';
import ErrorBoundary from 'web-check-live/components/boundaries/PageError.tsx';
import GlobalStyles from './styles/globals.tsx';
export default function App() {
return (
<Routes>
<Route path="/check" element={<Layout />}>
<Route index element={<Home />} />
<Route path="home" element={<Home />} />
<Route path="about" element={<About />} />
<Route path=":urlToScan" element={<Results />} />
<Route path="*" element={<NotFound />} />
</Route>
</Routes>
<ErrorBoundary>
<Routes>
<Route path="/check" element={<Layout />}>
<Route index element={<Home />} />
<Route path="home" element={<Home />} />
<Route path="about" element={<About />} />
<Route path=":urlToScan" element={<Results />} />
<Route path="*" element={<NotFound />} />
</Route>
</Routes>
</ErrorBoundary>
);
}
function Layout() {
return (<Outlet />);
return (
<>
<GlobalStyles />
<Outlet />
</>
);
}

View File

@@ -1,7 +1,6 @@
import { BrowserRouter } from "react-router-dom";
import { StaticRouter } from "react-router-dom/server";
import App from "./App.tsx";
// import "./App.css";
export default ({ pathname }: { pathname: string }) => (
import.meta.env.SSR

View File

@@ -9,7 +9,10 @@ const GlobalStyles = () => (
font-weight: 400;
src: url('/fonts/PTMono.ttf') format('ttf');
}
body { font-family: PTMono; }
body, div, a, p, span, ul, li, small, h1, h2, h3, h4, button, section {
font-family: PTMono;
color: #fff;
}
`}
/>
);