diff options
Diffstat (limited to 'ui/src/components/history')
| -rw-r--r-- | ui/src/components/history/HistoryInspect.tsx | 4 | ||||
| -rw-r--r-- | ui/src/components/history/HistoryRow.tsx | 5 | ||||
| -rw-r--r-- | ui/src/components/history/Stats.tsx | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/ui/src/components/history/HistoryInspect.tsx b/ui/src/components/history/HistoryInspect.tsx index 8e820169..6c46f2db 100644 --- a/ui/src/components/history/HistoryInspect.tsx +++ b/ui/src/components/history/HistoryInspect.tsx @@ -4,7 +4,7 @@ import PacmanLoader from "react-spinners/PacmanLoader"; import CodeBlock from "@/components/CodeBlock"; import HistoryRow from "@/components/history/HistoryRow"; -import { inspectCommandHistory } from "@/state/models"; +import { ShellHistory, inspectCommandHistory } from "@/state/models"; function renderLoading() { return ( @@ -15,7 +15,7 @@ function renderLoading() { } export default function HistoryInspect({ history }: any) { - let [other, setOther] = useState([]); + let [other, setOther] = useState<ShellHistory[]>([]); useEffect(() => { (async () => { diff --git a/ui/src/components/history/HistoryRow.tsx b/ui/src/components/history/HistoryRow.tsx index ef76d000..98d271fb 100644 --- a/ui/src/components/history/HistoryRow.tsx +++ b/ui/src/components/history/HistoryRow.tsx @@ -3,7 +3,10 @@ import { DateTime } from "luxon"; import { ChevronRightIcon } from "@heroicons/react/20/solid"; import { Highlight, themes } from "prism-react-renderer"; +// @ts-ignore import Prism from "prismjs"; + +// @ts-ignore import "prismjs/components/prism-bash"; import Drawer from "../Drawer"; @@ -49,7 +52,7 @@ export default function HistoryRow({ h }: any) { language="bash" prism={Prism} > - {({ className, style, tokens, getLineProps, getTokenProps }) => ( + {({ style, tokens, getLineProps, getTokenProps }) => ( <pre style={style} className="!bg-inherit text-sm"> {tokens && tokens.map((line, i) => { diff --git a/ui/src/components/history/Stats.tsx b/ui/src/components/history/Stats.tsx index df25d930..9e2c9a64 100644 --- a/ui/src/components/history/Stats.tsx +++ b/ui/src/components/history/Stats.tsx @@ -48,7 +48,7 @@ function TopTable({ stats }: any) { </tr> </thead> <tbody className="divide-y divide-gray-200 bg-white"> - {stats.map((stat) => ( + {stats.map((stat: any) => ( <tr> <td className="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"> {stat[0][0]} |
