From c32bbcc7edc2cf99da52b1407c90238bc781a804 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Thu, 25 Jul 2024 23:31:38 +0100 Subject: feat(gui): directory block, re-org of some code (#2314) --- ui/src/pages/History.tsx | 19 +++++++++---------- ui/src/pages/Runbooks.tsx | 9 ++++++++- 2 files changed, 17 insertions(+), 11 deletions(-) (limited to 'ui/src/pages') diff --git a/ui/src/pages/History.tsx b/ui/src/pages/History.tsx index 64c2fca6..7002f3c4 100644 --- a/ui/src/pages/History.tsx +++ b/ui/src/pages/History.tsx @@ -6,7 +6,7 @@ import HistorySearch from "@/components/HistorySearch.tsx"; import Stats from "@/components/history/Stats.tsx"; import Drawer from "@/components/Drawer.tsx"; -import { useStore } from "@/state/store"; +import { AtuinState, useStore } from "@/state/store"; function Header() { return ( @@ -49,9 +49,13 @@ function Header() { } export default function Search() { - const history = useStore((state) => state.shellHistory); - const refreshHistory = useStore((state) => state.refreshShellHistory); - const historyNextPage = useStore((state) => state.historyNextPage); + const history = useStore((state: AtuinState) => state.shellHistory); + const refreshHistory = useStore( + (state: AtuinState) => state.refreshShellHistory, + ); + const historyNextPage = useStore( + (state: AtuinState) => state.historyNextPage, + ); let [query, setQuery] = useState(""); @@ -84,12 +88,7 @@ export default function Search() { return ( <> -
-
-
-

A history of all the commands you run in your shell.

-
- +
- {currentRunbook && } + {currentRunbook && ( +
+ +
+ )} {!currentRunbook && (
-- cgit v1.3.1