From da944c8e74a892996ad4516681e101fb1749f922 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Wed, 8 Nov 2023 02:21:54 +0200 Subject: [PATCH] format --- src/pages/LogsPage/LogsPage.tsx | 76 +- src/pages/LogsPage/LogsSumCard.tsx | 97 +-- src/pages/LogsPage/LogsTerminal.tsx | 1199 +++++++++++++++------------ 3 files changed, 730 insertions(+), 642 deletions(-) diff --git a/src/pages/LogsPage/LogsPage.tsx b/src/pages/LogsPage/LogsPage.tsx index 11e2b194..23f8ac0d 100644 --- a/src/pages/LogsPage/LogsPage.tsx +++ b/src/pages/LogsPage/LogsPage.tsx @@ -1,44 +1,42 @@ -import { Stack, XStack, YStack } from "tamagui"; -import TitleLogo from "../Dashboard/TitleLogo"; - -import LeftSidebar from "../../components/General/LeftSidebar/LeftSidebar"; -import RightSidebar from "../../components/General/RightSideBar/RightSidebar"; -import LogsTerminal from "./LogsTerminal"; -import LogsSumCard from "./LogsSumCard"; - +import { Stack, XStack, YStack } from 'tamagui' +import TitleLogo from '../Dashboard/TitleLogo' +import LeftSidebar from '../../components/General/LeftSidebar/LeftSidebar' +import RightSidebar from '../../components/General/RightSideBar/RightSidebar' +import LogsTerminal from './LogsTerminal' +import LogsSumCard from './LogsSumCard' const LogsPage = () => { - return ( - - - - - - - - - - - - - - - - - ) + return ( + + + + + + + + + + + + + + + + + ) } -export default LogsPage; \ No newline at end of file +export default LogsPage diff --git a/src/pages/LogsPage/LogsSumCard.tsx b/src/pages/LogsPage/LogsSumCard.tsx index 774326ef..49cd87d3 100644 --- a/src/pages/LogsPage/LogsSumCard.tsx +++ b/src/pages/LogsPage/LogsSumCard.tsx @@ -1,58 +1,49 @@ -import { Text } from "@status-im/components"; -import { Separator, Stack, XStack, YStack } from "tamagui"; -import IconText from "../../components/General/IconText"; -import Icon from "../../components/General/Icon"; +import { Text } from '@status-im/components' +import { Separator, Stack, XStack, YStack } from 'tamagui' +import IconText from '../../components/General/IconText' +import Icon from '../../components/General/Icon' - const LogsSumCard = () => { - return ( - - - - - Critical - - - - - 16 - - - Per Minute - - - - - - - - - } - weight={'semibold'} - > - {'Good'} - - - + return ( + + + + + Critical + + + + 16 + + + Per Minute + + - ); + + + + } weight={'semibold'}> + {'Good'} + + + + ) } -export default LogsSumCard; \ No newline at end of file +export default LogsSumCard diff --git a/src/pages/LogsPage/LogsTerminal.tsx b/src/pages/LogsPage/LogsTerminal.tsx index 13e339ce..43282a37 100644 --- a/src/pages/LogsPage/LogsTerminal.tsx +++ b/src/pages/LogsPage/LogsTerminal.tsx @@ -1,610 +1,709 @@ +import { useEffect, useState } from 'react' +import { FixedSizeList as List } from 'react-window' +import InfiniteLoader from 'react-window-infinite-loader' - -import { useEffect, useState } from 'react'; -import { FixedSizeList as List } from 'react-window'; -import InfiniteLoader from 'react-window-infinite-loader'; - -import { Stack, XStack } from 'tamagui'; +import { Stack, XStack } from 'tamagui' type DataType = { - option: string; - description: string; -}; + option: string + description: string +} interface RowProps { - data: DataType | undefined; - index: number; + data: DataType | undefined + index: number } const Row: React.FC = ({ data, index }) => { if (!data) { - return
Loading...
; + return
Loading...
} - const { option, description } = data; + const { option, description } = data return ( - + {index} {option} - - {description} - + {description} - ); -}; + ) +} const LogsTerminal: React.FC = () => { - const [data, setData] = useState<(DataType | undefined)[]>([]); + const [data, setData] = useState<(DataType | undefined)[]>([]) useEffect(() => { - const exampleData: DataType[] = - [ - { - "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]." - }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + const exampleData: DataType[] = [ + { + 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].', + }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, - { - "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": "--log-level", - "description": "Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO]." - }, + { + 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: '--log-level', + description: + 'Sets the log level for process and topics (e.g., DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none) [INFO].', + }, + ] + const initialData = [...exampleData, ...Array(500 - exampleData.length).fill(undefined)] + setData(initialData) + }, []) - ] - const initialData = [...exampleData, ...Array(500 - exampleData.length).fill(undefined)]; - setData(initialData); - }, []); - - const isItemLoaded = (index: number): boolean => index < data.length && data[index] !== undefined; + const isItemLoaded = (index: number): boolean => index < data.length && data[index] !== undefined const loadMoreItems = (startIndex: number, stopIndex: number): Promise => { - return new Promise((resolve) => { + return new Promise(resolve => { setTimeout(() => { - setData((prevData) => { - const newData = [...prevData]; + setData(prevData => { + const newData = [...prevData] for (let i = startIndex; i <= stopIndex; i++) { if (!newData[i]) { - newData[i] = { option: `Option ${i}`, description: `Description for ${i}` }; + newData[i] = { option: `Option ${i}`, description: `Description for ${i}` } } } - return newData; - }); - resolve(); - }, 1000); - }); - }; + return newData + }) + resolve() + }, 1000) + }) + } return ( - - + + {({ onItemsRendered, ref }: any) => ( { )} - ); -}; + ) +} -export default LogsTerminal; \ No newline at end of file +export default LogsTerminal