From 7eb985b616c12aed261fbef74a47c5a928c03e61 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Mon, 15 Jul 2024 19:12:01 +0100 Subject: feat(gui): add runbook list, ability to create and delete, sql storage (#2282) * wip * saving works :)) * functioning delete button * persist selection properly --- ui/src/pages/Runbooks.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'ui/src/pages') diff --git a/ui/src/pages/Runbooks.tsx b/ui/src/pages/Runbooks.tsx index 4237e065..0452a578 100644 --- a/ui/src/pages/Runbooks.tsx +++ b/ui/src/pages/Runbooks.tsx @@ -1,9 +1,20 @@ import Editor from "@/components/runbooks/editor/Editor"; +import List from "@/components/runbooks/List"; +import { useStore } from "@/state/store"; export default function Runbooks() { + const currentRunbook = useStore((store) => store.currentRunbook); + return ( -
- +
+ + {currentRunbook && } + + {!currentRunbook && ( +
+

Select or create a runbook

+
+ )}
); } -- cgit v1.3.1