resolve issues with new features

This commit is contained in:
Matthias Hochmeister
2026-03-12 10:21:26 +01:00
parent 31f1414e06
commit d5be68ca63
13 changed files with 275 additions and 86 deletions

View File

@@ -40,7 +40,7 @@ function UserOverviewTab() {
const [sortKey, setSortKey] = useState<SortKey>('name');
const [sortDir, setSortDir] = useState<SortDir>('asc');
const { data: users, isLoading } = useQuery({
const { data: users, isLoading, isError } = useQuery({
queryKey: ['admin', 'users'],
queryFn: adminApi.getUsers,
});
@@ -82,6 +82,17 @@ function UserOverviewTab() {
return <Box sx={{ display: 'flex', justifyContent: 'center', p: 4 }}><CircularProgress /></Box>;
}
if (isError) {
return (
<Box sx={{ p: 4, textAlign: 'center' }}>
<Typography color="error" gutterBottom>Benutzerdaten konnten nicht geladen werden.</Typography>
<Typography variant="body2" color="text.secondary">
Bitte versuchen Sie es später erneut.
</Typography>
</Box>
);
}
return (
<Box>
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 2 }}>