@@ -172,10 +169,7 @@ export function AIDistributionPanel({
return (
{a.label}
diff --git a/services/frontend/src/features/analytics/components/AttachmentStatsPanel.tsx b/services/frontend/src/features/analytics/components/AttachmentStatsPanel.tsx
index 5d32f8a..bb942e0 100644
--- a/services/frontend/src/features/analytics/components/AttachmentStatsPanel.tsx
+++ b/services/frontend/src/features/analytics/components/AttachmentStatsPanel.tsx
@@ -31,22 +31,36 @@ export function AttachmentStatsPanel({
);
}
- const uploadPct = stats.total_attachments > 0
- ? Math.round((stats.uploaded / stats.total_attachments) * 100)
- : 0;
+ const uploadPct =
+ stats.total_attachments > 0
+ ? Math.round((stats.uploaded / stats.total_attachments) * 100)
+ : 0;
- const failedPct = stats.total_attachments > 0
- ? Math.round((stats.failed / stats.total_attachments) * 100)
- : 0;
+ const failedPct =
+ stats.total_attachments > 0
+ ? Math.round((stats.failed / stats.total_attachments) * 100)
+ : 0;
const totalSizeMB = stats.total_size_bytes / (1024 * 1024);
const cards = [
- { label: "Total Media", value: formatNum(stats.total_attachments), accent: "text-foreground" },
+ {
+ label: "Total Media",
+ value: formatNum(stats.total_attachments),
+ accent: "text-foreground",
+ },
{ label: "Upload Success", value: `${uploadPct}%`, accent: "text-primary" },
{ label: "Gagal Upload", value: `${failedPct}%`, accent: "text-accent" },
- { label: "Total Ukuran", value: `${totalSizeMB.toFixed(1)} MB`, accent: "text-muted-foreground" },
- { label: "Pengupload", value: formatNum(stats.unique_uploaders), accent: "text-primary" },
+ {
+ label: "Total Ukuran",
+ value: `${totalSizeMB.toFixed(1)} MB`,
+ accent: "text-muted-foreground",
+ },
+ {
+ label: "Pengupload",
+ value: formatNum(stats.unique_uploaders),
+ accent: "text-primary",
+ },
];
const statusCards = [
@@ -81,7 +95,9 @@ export function AttachmentStatsPanel({
{stats.top_mime_type ? (
<>
Upload status media — tipe dominan:{" "}
-
{stats.top_mime_type}
+
+ {stats.top_mime_type}
+
>
) : (
"Upload status media di semua channel."
@@ -98,7 +114,12 @@ export function AttachmentStatsPanel({
{c.label}
-
diff --git a/services/frontend/src/features/analytics/components/ModerationActionsPanel.tsx b/services/frontend/src/features/analytics/components/ModerationActionsPanel.tsx
index 51d5cbc..c7a0821 100644
--- a/services/frontend/src/features/analytics/components/ModerationActionsPanel.tsx
+++ b/services/frontend/src/features/analytics/components/ModerationActionsPanel.tsx
@@ -16,11 +16,26 @@ interface ModerationActionsPanelProps {
}
const ACTION_LABELS: Record
= {
- delete_message: { label: "Hapus Pesan", color: "bg-red-100 text-red-700 border-red-200" },
- warn_user: { label: "Peringatan", color: "bg-yellow-100 text-yellow-700 border-yellow-200" },
- mute_user: { label: "Mute", color: "bg-orange-100 text-orange-700 border-orange-200" },
- kick_user: { label: "Kick", color: "bg-pink-100 text-pink-700 border-pink-200" },
- ban_user: { label: "Ban", color: "bg-accent/20 text-accent border-accent/30" },
+ delete_message: {
+ label: "Hapus Pesan",
+ color: "bg-red-100 text-red-700 border-red-200",
+ },
+ warn_user: {
+ label: "Peringatan",
+ color: "bg-yellow-100 text-yellow-700 border-yellow-200",
+ },
+ mute_user: {
+ label: "Mute",
+ color: "bg-orange-100 text-orange-700 border-orange-200",
+ },
+ kick_user: {
+ label: "Kick",
+ color: "bg-pink-100 text-pink-700 border-pink-200",
+ },
+ ban_user: {
+ label: "Ban",
+ color: "bg-accent/20 text-accent border-accent/30",
+ },
};
const STATUS_LABELS: Record = {
diff --git a/services/frontend/src/features/analytics/components/ViolatorTable.tsx b/services/frontend/src/features/analytics/components/ViolatorTable.tsx
index f6fdbbe..f73a785 100644
--- a/services/frontend/src/features/analytics/components/ViolatorTable.tsx
+++ b/services/frontend/src/features/analytics/components/ViolatorTable.tsx
@@ -142,17 +142,21 @@ export function ViolatorTable({ users, loading }: ViolatorTableProps) {
- {user.worst_flags?.length > 0
- ? user.worst_flags.slice(0, 3).map((flag) => (
-
- {flag}
-
- ))
- : —}
+ {user.worst_flags?.length > 0 ? (
+ user.worst_flags.slice(0, 3).map((flag) => (
+
+ {flag}
+
+ ))
+ ) : (
+
+ —
+
+ )}
|
diff --git a/services/frontend/src/features/analytics/index.tsx b/services/frontend/src/features/analytics/index.tsx
index 2d3c980..c0b5cff 100644
--- a/services/frontend/src/features/analytics/index.tsx
+++ b/services/frontend/src/features/analytics/index.tsx
@@ -119,7 +119,10 @@ export function AnalyticsPanel({ guildId, guildName }: AnalyticsPanelProps) {
-
+
diff --git a/services/frontend/src/shared/api/client.ts b/services/frontend/src/shared/api/client.ts
index 86a6ea7..90392d0 100644
--- a/services/frontend/src/shared/api/client.ts
+++ b/services/frontend/src/shared/api/client.ts
@@ -522,7 +522,9 @@ export function fetchModerationActions(params: {
...(params.hours && { hours: String(params.hours) }),
...(params.limit && { limit: String(params.limit) }),
});
- return request(`/api/analytics/moderation-actions?${sp}`);
+ return request(
+ `/api/analytics/moderation-actions?${sp}`,
+ );
}
export function fetchAIStats(params: {