From f8c963c7d668fc57680f25413f20bc207d4bf64a Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Tue, 23 Jul 2024 13:18:54 +0100 Subject: feat(gui): clean up home page, fix a few bugs (#2304) * wip home screen changes * more * adjust * fixes and things * patch runbook pty check --- ui/src/components/runbooks/List.tsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'ui/src/components/runbooks/List.tsx') diff --git a/ui/src/components/runbooks/List.tsx b/ui/src/components/runbooks/List.tsx index 72c1b3b3..024bcfd1 100644 --- a/ui/src/components/runbooks/List.tsx +++ b/ui/src/components/runbooks/List.tsx @@ -1,12 +1,7 @@ -import { useEffect, useState } from "react"; +import { useEffect } from "react"; import { - Input, Button, ButtonGroup, - Card, - CardBody, - CardHeader, - Divider, Tooltip, Listbox, ListboxItem, @@ -46,13 +41,13 @@ const NoteSidebar = () => {
{ + items={runbooks.map((runbook: any): any => { return [runbook, runbookInfo[runbook.id]]; })} variant="flat" aria-label="Runbook list" selectionMode="single" - selectedKeys={[currentRunbook]} + selectedKeys={currentRunbook ? [currentRunbook] : []} itemClasses={{ base: "data-[selected=true]:bg-gray-200" }} topContent={ @@ -74,7 +69,7 @@ const NoteSidebar = () => { } > - {([runbook, info]) => ( + {([runbook, info]: [Runbook, { ptys: number }]) => ( { @@ -124,7 +119,7 @@ const NoteSidebar = () => {
{DateTime.fromJSDate(runbook.updated).toLocaleString( - DateTime.DATETIME_SIMPLE, + DateTime.DATETIME_SHORT, )}
-- cgit v1.3.1