aboutsummaryrefslogtreecommitdiffstats
path: root/ui/src/components/runbooks/List.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/components/runbooks/List.tsx')
-rw-r--r--ui/src/components/runbooks/List.tsx15
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>