horarios-v3/src/App.tsx

41 lines
1.3 KiB
TypeScript
Raw Normal View History

2022-10-13 17:02:23 +00:00
import { Main } from "./Views/Main";
import { Index } from "./Views/Index";
import { Editor } from "./Views/Editor";
import { useRouter } from "./Router";
import { Switch, Match, Show } from "solid-js";
import { Wallpaper } from "./Wallpaper";
import { SistemasMovil } from "./Views/SistemasMovil";
2022-10-14 14:52:47 +00:00
import { SeleccionCursos } from "./Views/SeleccionCursos";
2021-01-14 15:26:29 +00:00
function App() {
2022-10-13 17:02:23 +00:00
const route = useRouter();
const isMobile = screen.width <= 500;
2021-01-14 23:24:55 +00:00
return (
2022-10-13 17:02:23 +00:00
<div className="App" style={isMobile ? "--color-texto: #202020;" : ""}>
<Show when={!isMobile}>
<Wallpaper />
</Show>
<Switch fallback={<p>404!</p>}>
<Match when={route() === "/"}>
<Index />
</Match>
<Match when={route() === "/editor/"}>
<Editor />
</Match>
2022-10-14 14:52:47 +00:00
<Match when={route() === "/seleccion-cursos/"}>
<SeleccionCursos />
</Match>
<Match when={route() === "/sistemas-movil/"}>
<SistemasMovil />
</Match>
<Match when={route() === "/sistemas/"}>
<Main />
</Match>
</Switch>
2021-01-14 23:24:55 +00:00
</div>
2022-10-13 17:02:23 +00:00
);
2021-01-14 15:26:29 +00:00
}
2022-10-13 17:02:23 +00:00
export default App;