refactor: replace remaining emojis with Lucide icons
Replace all raw emoji characters in dashboard cards, empty states, and onboarding wizard with LucideIcon components for visual consistency. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,55 +1,56 @@
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import { useTotals } from "../hooks/useTotals";
|
||||
import { useThreads } from "../hooks/useThreads";
|
||||
import { useSetups } from "../hooks/useSetups";
|
||||
import { DashboardCard } from "../components/DashboardCard";
|
||||
import { formatWeight, formatPrice } from "../lib/formatters";
|
||||
import { useSetups } from "../hooks/useSetups";
|
||||
import { useThreads } from "../hooks/useThreads";
|
||||
import { useTotals } from "../hooks/useTotals";
|
||||
import { formatPrice, formatWeight } from "../lib/formatters";
|
||||
|
||||
export const Route = createFileRoute("/")({
|
||||
component: DashboardPage,
|
||||
component: DashboardPage,
|
||||
});
|
||||
|
||||
function DashboardPage() {
|
||||
const { data: totals } = useTotals();
|
||||
const { data: threads } = useThreads(false);
|
||||
const { data: setups } = useSetups();
|
||||
const { data: totals } = useTotals();
|
||||
const { data: threads } = useThreads(false);
|
||||
const { data: setups } = useSetups();
|
||||
|
||||
const global = totals?.global;
|
||||
const activeThreadCount = threads?.length ?? 0;
|
||||
const setupCount = setups?.length ?? 0;
|
||||
const global = totals?.global;
|
||||
const activeThreadCount = threads?.length ?? 0;
|
||||
const setupCount = setups?.length ?? 0;
|
||||
|
||||
return (
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
<DashboardCard
|
||||
to="/collection"
|
||||
title="Collection"
|
||||
icon="🎒"
|
||||
stats={[
|
||||
{ label: "Items", value: String(global?.itemCount ?? 0) },
|
||||
{ label: "Weight", value: formatWeight(global?.totalWeight ?? null) },
|
||||
{ label: "Cost", value: formatPrice(global?.totalCost ?? null) },
|
||||
]}
|
||||
emptyText="Get started"
|
||||
/>
|
||||
<DashboardCard
|
||||
to="/collection"
|
||||
search={{ tab: "planning" }}
|
||||
title="Planning"
|
||||
icon="🔍"
|
||||
stats={[
|
||||
{ label: "Active threads", value: String(activeThreadCount) },
|
||||
]}
|
||||
/>
|
||||
<DashboardCard
|
||||
to="/setups"
|
||||
title="Setups"
|
||||
icon="🏕️"
|
||||
stats={[
|
||||
{ label: "Setups", value: String(setupCount) },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
<DashboardCard
|
||||
to="/collection"
|
||||
title="Collection"
|
||||
icon="backpack"
|
||||
stats={[
|
||||
{ label: "Items", value: String(global?.itemCount ?? 0) },
|
||||
{
|
||||
label: "Weight",
|
||||
value: formatWeight(global?.totalWeight ?? null),
|
||||
},
|
||||
{ label: "Cost", value: formatPrice(global?.totalCost ?? null) },
|
||||
]}
|
||||
emptyText="Get started"
|
||||
/>
|
||||
<DashboardCard
|
||||
to="/collection"
|
||||
search={{ tab: "planning" }}
|
||||
title="Planning"
|
||||
icon="search"
|
||||
stats={[
|
||||
{ label: "Active threads", value: String(activeThreadCount) },
|
||||
]}
|
||||
/>
|
||||
<DashboardCard
|
||||
to="/setups"
|
||||
title="Setups"
|
||||
icon="tent"
|
||||
stats={[{ label: "Setups", value: String(setupCount) }]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user