summaryrefslogtreecommitdiff
path: root/gui/src/components/app
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2024-10-22 07:46:43 +0100
committerJoe Carstairs <me@joeac.net>2024-10-22 07:46:43 +0100
commit5824c353f978a5b9ab9696451ee3014c6a614ffc (patch)
treebc39754ca417e84eb00b0aa9a1ae2330da0bf282 /gui/src/components/app
parent7adaace61a4fe983eba5ded3aaaf624ce6fb9014 (diff)
Refactors importer to use core stuff
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