Show a message on tokens list route when no token was created yet
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-05-30 11:35:00 +02:00
parent fa03ae885f
commit ec9492c933

View File

@@ -10,6 +10,7 @@ import {
TableContainer, TableContainer,
TableHead, TableHead,
TableRow, TableRow,
Typography,
} from "@mui/material"; } from "@mui/material";
import React from "react"; import React from "react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
@@ -58,6 +59,7 @@ export function TokensListRouteInner(p: {
</RouterLink> </RouterLink>
} }
> >
{p.list.length > 0 && (
<TableContainer component={Paper}> <TableContainer component={Paper}>
<Table> <Table>
<TableHead> <TableHead>
@@ -122,6 +124,13 @@ export function TokensListRouteInner(p: {
</TableBody> </TableBody>
</Table> </Table>
</TableContainer> </TableContainer>
)}
{p.list.length === 0 && (
<Typography style={{ textAlign: "center" }}>
No API token created yet.
</Typography>
)}
</VirtWebRouteContainer> </VirtWebRouteContainer>
); );
} }