feat: refactor and adjust ui

This commit is contained in:
GyDi
2022-01-16 03:11:07 +08:00
parent 8dbf870122
commit fb0bb6e7f3
14 changed files with 264 additions and 191 deletions

View File

@@ -1,8 +1,9 @@
import { useEffect, useState } from "react";
import { Box, Paper, Typography } from "@mui/material";
import { Paper } from "@mui/material";
import { Virtuoso } from "react-virtuoso";
import { getInfomation } from "../services/api";
import { ApiType } from "../services/types";
import { getInfomation } from "../services/api";
import BasePage from "../components/base-page";
import ConnectionItem from "../components/connection-item";
const ConnectionsPage = () => {
@@ -26,25 +27,14 @@ const ConnectionsPage = () => {
}, []);
return (
<Box
sx={{
width: 0.9,
maxWidth: "850px",
height: "100%",
mx: "auto",
}}
>
<Typography variant="h4" component="h1" sx={{ py: 2 }}>
Connections
</Typography>
<Paper sx={{ boxShadow: 2, height: "calc(100% - 100px)" }}>
<BasePage title="Connections" contentStyle={{ height: "100%" }}>
<Paper sx={{ boxShadow: 2, height: "100%" }}>
<Virtuoso
data={conn.connections}
itemContent={(index, item) => <ConnectionItem value={item} />}
/>
</Paper>
</Box>
</BasePage>
);
};