import Head from 'next/head' import styles from '../styles/Home.module.css' import Processes from "../components/elements/processes"; import {Tabs, Tab, MenuItem, Select, InputLabel, TextareaAutosize, Button} from '@mui/material'; import {useContext, useEffect, useState} from "react"; import Commands from "../components/elements/commands"; import {Provider as TabProvider} from '../context/tab' import Context from "../context/token"; export enum TabEnum { Commands, Processes, } export default function Home() { let {token, tokens, addToken} = useContext(Context) const [tab, setTab] = useState(TabEnum.Processes); const handleChange = (event: any, tab: number) => setTab(tab) // useEffect(() => { // const storedToken = grabToken() // setToken(storedToken) // const storedTokens = grabTokens() // setTokens(storedTokens) // }, []) let onTokenInput = (event: any) => { } if (!token) { return ( <> System monitoring

Для дальнейшей работы добавьте JWT токен

addToken(event.target.value)} />
) } return ( <> System monitoring
{tokens.length > 0 && <> Tokens } {token && <> {tab === TabEnum.Commands && } {tab === TabEnum.Processes && } }
) }