Implement aggregation frontend, also http on prod
This commit is contained in:
+17
-13
@@ -1,24 +1,28 @@
|
||||
import type { Component } from 'solid-js';
|
||||
import { Component, createSignal } from 'solid-js';
|
||||
import { Aggregator } from './aggregator/Aggregator';
|
||||
|
||||
import logo from './assets/logo.svg';
|
||||
import styles from './css/App.module.css';
|
||||
import { FileManager } from './fileManager/FileManager';
|
||||
|
||||
console.log("env:", import.meta.env.MODE);
|
||||
console.log("api host:", import.meta.env.VITE_API_HOST);
|
||||
|
||||
type Section = "aggregator" | "fileManager";
|
||||
|
||||
const App: Component = () => {
|
||||
return (
|
||||
<div class={styles.App}>
|
||||
<FileManager />
|
||||
<header class={styles.header}>
|
||||
<img src={logo} class={styles.logo} alt="logo" />
|
||||
<p>
|
||||
Weather tool web
|
||||
</p>
|
||||
</header>
|
||||
</div>
|
||||
);
|
||||
const [getSection, setSection] = createSignal<Section>("aggregator");
|
||||
|
||||
const section = () => getSection() === "aggregator" ? <Aggregator /> : <FileManager />;
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user