diff options
| author | Ellie Huxtable <ellie@atuin.sh> | 2024-07-23 13:18:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-23 13:18:54 +0100 |
| commit | f8c963c7d668fc57680f25413f20bc207d4bf64a (patch) | |
| tree | c7f952ddc0220cded24f5447d03b3bff46fb1d45 /ui/src/components/runbooks/List.tsx | |
| parent | fix(themes): Restore default theme, refactor (#2294) (diff) | |
| download | atuin-f8c963c7d668fc57680f25413f20bc207d4bf64a.zip | |
feat(gui): clean up home page, fix a few bugs (#2304)
* wip home screen changes
* more
* adjust
* fixes and things
* patch runbook pty check
Diffstat (limited to 'ui/src/components/runbooks/List.tsx')
| -rw-r--r-- | ui/src/components/runbooks/List.tsx | 15 |
1 files changed, 5 insertions, 10 deletions
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 = () => { <div className="overflow-y-auto flex-grow"> <Listbox hideSelectedIcon - items={runbooks.map((runbook) => { + 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={ <ButtonGroup className="z-20"> @@ -74,7 +69,7 @@ const NoteSidebar = () => { </ButtonGroup> } > - {([runbook, info]) => ( + {([runbook, info]: [Runbook, { ptys: number }]) => ( <ListboxItem key={runbook.id} onPress={() => { @@ -124,7 +119,7 @@ const NoteSidebar = () => { <div className="text-xs text-gray-500"> <em> {DateTime.fromJSDate(runbook.updated).toLocaleString( - DateTime.DATETIME_SIMPLE, + DateTime.DATETIME_SHORT, )} </em> </div> |
