feat: add empty ui
This commit is contained in:
parent
ab58968f4d
commit
b915f3b1a9
@ -6,6 +6,7 @@ import { useTranslation } from "react-i18next";
|
||||
import { closeAllConnections, getInformation } from "@/services/api";
|
||||
import BasePage from "@/components/base/base-page";
|
||||
import ConnectionItem from "@/components/connection/connection-item";
|
||||
import BaseEmpty from "@/components/base/base-empty";
|
||||
|
||||
const initConn = { uploadTotal: 0, downloadTotal: 0, connections: [] };
|
||||
|
||||
@ -122,10 +123,14 @@ const ConnectionsPage = () => {
|
||||
</Box>
|
||||
|
||||
<Box height="calc(100% - 50px)">
|
||||
<Virtuoso
|
||||
data={filterConn}
|
||||
itemContent={(index, item) => <ConnectionItem value={item} />}
|
||||
/>
|
||||
{filterConn.length > 0 ? (
|
||||
<Virtuoso
|
||||
data={filterConn}
|
||||
itemContent={(index, item) => <ConnectionItem value={item} />}
|
||||
/>
|
||||
) : (
|
||||
<BaseEmpty text="No Connections" />
|
||||
)}
|
||||
</Box>
|
||||
</Paper>
|
||||
</BasePage>
|
||||
|
@ -6,6 +6,7 @@ import { useTranslation } from "react-i18next";
|
||||
import { atomLogData } from "@/services/states";
|
||||
import BasePage from "@/components/base/base-page";
|
||||
import LogItem from "@/components/log/log-item";
|
||||
import BaseEmpty from "@/components/base/base-empty";
|
||||
|
||||
const LogPage = () => {
|
||||
const { t } = useTranslation();
|
||||
@ -75,12 +76,16 @@ const LogPage = () => {
|
||||
</Box>
|
||||
|
||||
<Box height="calc(100% - 50px)">
|
||||
<Virtuoso
|
||||
initialTopMostItemIndex={999}
|
||||
data={filterLogs}
|
||||
itemContent={(index, item) => <LogItem value={item} />}
|
||||
followOutput={"smooth"}
|
||||
/>
|
||||
{filterLogs.length > 0 ? (
|
||||
<Virtuoso
|
||||
initialTopMostItemIndex={999}
|
||||
data={filterLogs}
|
||||
itemContent={(index, item) => <LogItem value={item} />}
|
||||
followOutput={"smooth"}
|
||||
/>
|
||||
) : (
|
||||
<BaseEmpty text="No Logs" />
|
||||
)}
|
||||
</Box>
|
||||
</Paper>
|
||||
</BasePage>
|
||||
|
Loading…
x
Reference in New Issue
Block a user