From f38696e60ebfcb19472241117a5fa5dc02bb1845 Mon Sep 17 00:00:00 2001 From: qt-coder Date: Sun, 4 Jul 2021 18:42:43 +0800 Subject: [PATCH] Replaced dummy data in commands page to API data --- pages/controlpanel/commands.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pages/controlpanel/commands.js b/pages/controlpanel/commands.js index 592d0ce..2cce5e4 100644 --- a/pages/controlpanel/commands.js +++ b/pages/controlpanel/commands.js @@ -13,6 +13,7 @@ import { import Head from 'next/head' import { useSession } from 'next-auth/client' import axios from 'axios' +import { FaBullseye } from 'react-icons/fa'; function Controller({ initialState }) { @@ -29,6 +30,13 @@ function Controller({ initialState }) { ) } +function processOnline(status) { + console.log(status) + if (status == 'online') { return true } + if (status == 'offline') { return false } + if (status == 'maintenance') { return false } +} + function Commands() { const [session, loading] = useSession() @@ -70,7 +78,7 @@ function Commands() { {command.name} - + ))}