import "./app.css";
import { Router } from "@solidjs/router";
import { FileRoutes } from "@solidjs/start/router";
import { Suspense } from "solid-js";
import pkg from "~/../package.json";

const Version = () => (
	<div class="full free">
		<span style={{ margin: "5px", "font-size": "0.8rem" }} class="fixed-br">
			v{pkg.version}
		</span>
	</div>
);

export default function App() {
	return (
		<Router
			root={(props) => (
				<>
					<Suspense>{props.children}</Suspense>
					<Version />
				</>
			)}
		>
			<FileRoutes />
		</Router>
	);
}
