import Head from 'next/head' import styles from '../styles/Home.module.css' import {OptionInterface} from "../components/elements/option"; import {ArgumentInterface} from "../components/elements/argument"; import Command from "../components/elements/command"; 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

Tasks

{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 }, } }