From 65dd6bc6a6b346e993fe2117cf7658bafea70d5a Mon Sep 17 00:00:00 2001
From: GyDi <segydi@foxmail.com>
Date: Wed, 15 Dec 2021 01:52:46 +0800
Subject: [PATCH] chore: init connections page

---
 src/pages/connections.tsx | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/pages/connections.tsx b/src/pages/connections.tsx
index cb267e0..2bd1695 100644
--- a/src/pages/connections.tsx
+++ b/src/pages/connections.tsx
@@ -1,5 +1,23 @@
+import { useEffect } from "react";
+import { Box, Typography } from "@mui/material";
+import services from "../services";
+
 const ConnectionsPage = () => {
-  return <h1>Connection</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 }}>
+        Connections
+      </Typography>
+    </Box>
+  );
 };
 
 export default ConnectionsPage;
-- 
GitLab