mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Remove not working stats
This commit is contained in:
@@ -9,27 +9,10 @@ import {
|
||||
Alert,
|
||||
RingProgress,
|
||||
} from '@mantine/core';
|
||||
import {
|
||||
IconUsers,
|
||||
IconFolders,
|
||||
IconServer,
|
||||
IconFiles,
|
||||
IconAlertCircle,
|
||||
} from '@tabler/icons-react';
|
||||
import { IconUsers, IconFolders, IconAlertCircle } from '@tabler/icons-react';
|
||||
import { useAdmin } from '../../../hooks/useAdmin';
|
||||
import StatCard from './StatCard';
|
||||
|
||||
const formatBytes = (bytes) => {
|
||||
const units = ['B', 'KB', 'MB', 'GB'];
|
||||
let size = bytes;
|
||||
let unitIndex = 0;
|
||||
while (size >= 1024 && unitIndex < units.length - 1) {
|
||||
size /= 1024;
|
||||
unitIndex++;
|
||||
}
|
||||
return `${size.toFixed(1)} ${units[unitIndex]}`;
|
||||
};
|
||||
|
||||
const AdminStatsTab = () => {
|
||||
const { data: stats, loading, error } = useAdmin('stats');
|
||||
|
||||
@@ -68,22 +51,6 @@ const AdminStatsTab = () => {
|
||||
color="grape"
|
||||
/>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={{ base: 12, md: 6, lg: 3 }}>
|
||||
<StatCard
|
||||
title="Storage Used"
|
||||
value={formatBytes(stats.storageUsed)}
|
||||
icon={IconServer}
|
||||
color="teal"
|
||||
/>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={{ base: 12, md: 6, lg: 3 }}>
|
||||
<StatCard
|
||||
title="Total Files"
|
||||
value={stats.totalFiles}
|
||||
icon={IconFiles}
|
||||
color="orange"
|
||||
/>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
|
||||
<Grid mt="md">
|
||||
|
||||
Reference in New Issue
Block a user