Files
WeatherTool/web/src/App.tsx
T

36 lines
1.0 KiB
TypeScript
Raw Normal View History

import { Component, createSignal } from 'solid-js';
import { Aggregator } from './aggregator/Aggregator';
import styles from './css/App.module.css';
2023-05-15 16:37:03 +03:00
import { FileManager } from './fileManager/FileManager';
2023-05-14 23:01:36 +03:00
console.log("env:", import.meta.env.MODE);
console.log("api host:", import.meta.env.VITE_API_HOST);
2023-08-07 23:25:35 +03:00
type Section = "aggregator" | "mapView" | "fileManager";
const App: Component = () => {
const [getSection, setSection] = createSignal<Section>("aggregator");
2023-08-07 23:25:35 +03:00
const section = () => {
switch(getSection()) {
case "fileManager": return <FileManager />;
case "aggregator":
default:
return <Aggregator />;
}
}
return (
<div class={styles.App}>
<div class={styles.sections}>
<span onClick={() => setSection("aggregator")}>aggregator</span> |
<span onClick={() => setSection("fileManager")}>file manager</span>
</div>
{ section() }
</div>
);
};
export default App;