62 | {displayLines.map((line, i) => (
63 |
67 | {line}
68 |
69 | ))}
70 | {lines.length > limit ? (
71 | <>
72 |
80 | >
81 | ) : null}
82 |
83 | );
84 | };
85 |
--------------------------------------------------------------------------------
/webui/src/components/ModalManager.tsx:
--------------------------------------------------------------------------------
1 | import React, { useContext } from "react";
2 | import { createContext } from "react";
3 |
4 | const ModalContext = createContext<{
5 | model: React.ReactNode | null;
6 | setModel: (model: React.ReactNode | null) => void;
7 | }>({
8 | model: null,
9 | setModel: () => {
10 | throw new Error("add a ModelContextProvider to your hierarchy");
11 | },
12 | });
13 |
14 | export const ModalContextProvider = ({
15 | children,
16 | }: {
17 | children: React.ReactNode;
18 | }) => {
19 | const [modal, setModals] = React.useState