import Head from 'next/head' import styles from '../styles/Home.module.css' import {OptionInterface} from "../components/elements/command/elements/option"; import {ArgumentInterface} from "../components/elements/command/elements/argument"; import Command from "../components/elements/command"; import Tabs from "../components/elements/tabs"; import Tab from "../components/elements/tabs/elements/tab"; import TabTitle from "../components/elements/tabs/elements/tab-title"; import TabSection from "../components/elements/tabs/elements/tab-section"; import Processes from "../components/elements/processes"; interface CommandInterface { class: string, name: string, description: string, options: OptionInterface[], arguments: ArgumentInterface[], } interface CommandsInterface { commands: CommandInterface[], } export default function Home({commands}: CommandsInterface) { return ( <> System monitoring
Команды
{commands.map((command: CommandInterface, index: number) => ( ))}
Процессы
) } export async function getStaticProps(context: any) { let response = await fetch('http://fmw.sipachev.sv/system-monitoring/commands'); const commands: CommandsInterface = await response.json() return { props: { 'commands': commands }, } }