import { render } from 'preact';
import { LocationProvider, Route, Router } from 'preact-iso';

import "./index.css";
import { NotFound } from './pages/_404.jsx';
import { Error } from './pages/Error/index.js';
import { Home } from './pages/Home/index.jsx';

export function App() {
	return (
		<LocationProvider>
			<div class="bg-black text-green-500 h-screen p-4">
				<Router>
					<Route path="/" component={Home} />
					<Route default component={NotFound} />
					<Route path="/error" component={Error} />
				</Router>
			</div>
		</LocationProvider>
	);
}

render(<App />, document.getElementById('app'));
