summaryrefslogtreecommitdiff
path: root/gui/src/components/app
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/components/app')
-rw-r--r--gui/src/components/app/App.css1
-rw-r--r--gui/src/components/app/App.tsx33
2 files changed, 0 insertions, 34 deletions
diff --git a/gui/src/components/app/App.css b/gui/src/components/app/App.css
deleted file mode 100644
index 8b13789..0000000
--- a/gui/src/components/app/App.css
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/gui/src/components/app/App.tsx b/gui/src/components/app/App.tsx
deleted file mode 100644
index e9ef742..0000000
--- a/gui/src/components/app/App.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import { createResource, Match, Resource, Switch } from 'solid-js';
-import Histogram from '../histogram/Histogram'
-import './App.css'
-import { getAllCategories } from '../../ajax/backend';
-import { Category } from '../../types/category';
-
-function App() {
- const [categories] = createResource(getAllCategories);
-
- return (
- <Switch>
- <Match when={categories.state === 'ready'}>
- <Histogram categories={(categories as Extract<Resource<Category[]>, { state: 'ready' }>)()} />
- </Match>
- <Match when={categories.state === 'pending'}>
- <p>Loading...</p>
- </Match>
- <Match when={categories.state === 'unresolved'}>
- <p>Unresolved!</p>
- </Match>
- <Match when={categories.state === 'errored'}>
- <p>Error!</p>
- <p>{JSON.stringify(categories.error, null, 2)}</p>
- <p>{JSON.stringify(categories(), null, 2)}</p>
- </Match>
- <Match when={categories.state === 'refreshing'}>
- <p>Refreshing!</p>
- </Match>
- </Switch>
- );
-}
-
-export default App