diff --git a/src/pages/LogsPage/LogsTerminal.tsx b/src/pages/LogsPage/LogsTerminal.tsx index 43a106bb..0d1dbe10 100644 --- a/src/pages/LogsPage/LogsTerminal.tsx +++ b/src/pages/LogsPage/LogsTerminal.tsx @@ -1,54 +1,94 @@ - + import { FixedSizeList as List } from 'react-window'; import InfiniteLoader from 'react-window-infinite-loader'; -import { Button } from "tamagui"; +import { Stack } from 'tamagui'; +import { XStack } from "tamagui"; +const exampleData = + [ + { + "option": "--config-file", + "description": "Loads the configuration from a TOML file." + }, + { + "option": "--log-level", + "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." + }, + { + "option": "--config-file", + "description": "Loads the configuration from a TOML file." + }, + { + "option": "--log-level", + "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." + }, + { + "option": "--config-file", + "description": "Loads the configuration from a TOML file." + }, + { + "option": "--log-level", + "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." + }, + { + "option": "--config-file", + "description": "Loads the configuration from a TOML file." + }, + { + "option": "--log-level", + "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." + }, + + ] + const loadMoreItems = (startIndex, stopIndex) => { + // Fetch more items from an API or other data source... + return new Promise(resolve => { + setTimeout(() => { + resolve(); + }, 1000); + }); + }; +type DataType = { + option: string + description: string +} +function Row({ data, index }: { data: DataType, index: number }) { + + const { option, description } = data; -// This is just a sample row renderer. Adjust according to your data. -function Row(props: any) { - const { index, style } = props; return ( -
- -
+ + + {index} + + + {option} + + + {description} + + ); } function LogsTerminal() { - // Sample itemCount & loadMoreItems for demonstration purposes. - const itemCount = 1000; - const loadMoreItems = (startIndex: number, stopIndex: number) => { - console.log("Loading more items from:", startIndex, "to", stopIndex); - return new Promise((resolve) => setTimeout(resolve, 1000)); - }; - - const isItemLoaded = (index: number) => { - // Add your logic here to check if the item is already loaded or not. - return false; - }; - + return ( -
- + + - {({ onItemsRendered, ref }) => ( - - {Row} - + {({ index }: any) => ( + )} - -
+ + + ); } + export default LogsTerminal;