feat: add some clash api

This commit is contained in:
GyDi
2021-12-13 02:27:38 +08:00
parent 433716cf33
commit 4bb9e10946
3 changed files with 77 additions and 1 deletions

View File

@@ -1,5 +1,23 @@
import { useEffect } from "react";
import { Box, Typography } from "@mui/material";
import services from "../services";
const LogPage = () => {
return <h1>Log</h1>;
useEffect(() => {
const sourcePromise = services.getLogs(console.log);
return () => {
sourcePromise.then((src) => src.cancel());
};
}, []);
return (
<Box sx={{ width: 0.9, maxWidth: "850px", mx: "auto", mb: 2 }}>
<Typography variant="h4" component="h1" sx={{ py: 2 }}>
Logs
</Typography>
</Box>
);
};
export default LogPage;