diff options
Diffstat (limited to 'gui/src/views/histogram')
| -rw-r--r-- | gui/src/views/histogram/HistogramView.tsx | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/gui/src/views/histogram/HistogramView.tsx b/gui/src/views/histogram/HistogramView.tsx deleted file mode 100644 index 30e64ca..0000000 --- a/gui/src/views/histogram/HistogramView.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { Match, Resource, Switch } from 'solid-js'; -import Histogram from '../../components/histogram/Histogram' -import { Category } from '../../types/category'; - -export function HistogramView({ categories }: Props) { - 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> - ); -} - -type Props = { - categories: Resource<Category[] | null>; -} |
