Jan Naahs 738bdf4f99 wip
2020-08-02 20:22:53 +02:00

29 lines
636 B
JavaScript

import React, {useEffect, useState} from "react";
import Layout from "../components/Layout";
import log from "../../api/resources/log";
import Panel from "../components/Panel";
const Logs = () => {
const [logs, setLogs] = useState([])
useEffect(() => {
(async () => {
const logs = await log.tail()
setLogs(logs.data);
})();
}, [])
return (
<Panel
title="Logs"
content={
<ul>
{logs.map((log,index) => (<li key={index}>{log}</li>))}
</ul>
}
/>
);
}
export default Logs;