Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion admin-dashboard/app/admin/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { getFeeMultiplierData } from "@/lib/fee-multiplier-data";
import { FeeEstimatorWidget } from "@/components/dashboard/FeeEstimatorWidget";
import { ExpenseBreakdown } from "@/components/dashboard/ExpenseBreakdown";
import { getExpenseBreakdownData } from "@/lib/expense-breakdown-data";
import { TelemetryConsentSettings } from "@/components/dashboard/TelemetryConsentSettings";
import { getTreasuryCriticalBannerState } from "@/lib/treasury-critical-banner";
import { AlertTriangle } from "lucide-react";
import { LiveTransactionFeed } from "@/components/dashboard/LiveTransactionFeed";
Expand Down Expand Up @@ -140,6 +141,10 @@ export default async function AdminDashboard() {
<FeeEstimatorWidget />
</section>

<section className="mt-6">
<TelemetryConsentSettings />
</section>

{/* Tables */}
<section className="mt-6 space-y-6">
<div className="flex flex-wrap gap-3">
Expand Down Expand Up @@ -198,4 +203,4 @@ export default async function AdminDashboard() {
<AdminGuidedTour userKey={session?.user?.id ?? session?.user?.email ?? "anonymous"} />
</div>
);
}
}
1 change: 1 addition & 0 deletions admin-dashboard/components/dashboard/ResponsiveTables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export function TransactionsTable({

return (
<FragmentRow key={transaction.id}>
<tr className="align-top">
<td className="px-5 py-4">
<div className="font-semibold text-slate-900">{transaction.amount}</div>
<div className="text-xs text-slate-500 md:hidden">{transaction.asset}</div>
Expand Down
15 changes: 8 additions & 7 deletions admin-dashboard/components/dashboard/StatusBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
"use client";

import type { TransactionStatus } from "@/components/dashboard/types";
import type { TransactionStatus, WebhookDeliveryStatus } from "@/components/dashboard/types";
import { Pulse } from "@/components/ui/motion";

type BadgeTone = "green" | "amber" | "slate" | "red";

function getTone(status: TransactionStatus | "active" | "inactive"): BadgeTone {
type AllowedStatus = TransactionStatus | WebhookDeliveryStatus | "active" | "inactive";

function getTone(status: AllowedStatus): BadgeTone {
switch (status) {
case "success":
case "active":
return "green";
case "pending":
case "submitted":
case "retrying":
return "amber";
case "failed":
return "red";
Expand All @@ -20,16 +23,14 @@ function getTone(status: TransactionStatus | "active" | "inactive"): BadgeTone {
}
}

function isPendingStatus(
status: TransactionStatus | "active" | "inactive"
): boolean {
return status === "pending" || status === "submitted";
function isPendingStatus(status: AllowedStatus): boolean {
return status === "pending" || status === "submitted" || status === "retrying";
}

export function StatusBadge({
status,
}: {
status: TransactionStatus | "active" | "inactive";
status: AllowedStatus;
}) {
const toneClassName = {
green:
Expand Down
Loading
Loading