Hide rank tracking card from project dashboard (#399)
Remove the RankMovementCard (setup pitch + rank movement stats) from the dashboard grid until the rank tracking experience gets more polish. The overview endpoint still returns the rank summary, so restoring the card is a small revert of this commit.
This commit is contained in:
parent
b981e83bf8
commit
7f2e730a1c
@ -22,7 +22,6 @@ import {
|
|||||||
import type {
|
import type {
|
||||||
DashboardAuditSummary,
|
DashboardAuditSummary,
|
||||||
DashboardBacklinkSummary,
|
DashboardBacklinkSummary,
|
||||||
DashboardRankSummary,
|
|
||||||
} from "@/server/features/dashboard/services/DashboardService";
|
} from "@/server/features/dashboard/services/DashboardService";
|
||||||
|
|
||||||
// Plain string-keyed view of the registry: issue types from the DB are not
|
// Plain string-keyed view of the registry: issue types from the DB are not
|
||||||
@ -116,68 +115,6 @@ export function GscCard({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function RankMovementCard({
|
|
||||||
projectId,
|
|
||||||
rank,
|
|
||||||
}: {
|
|
||||||
projectId: string;
|
|
||||||
rank: DashboardRankSummary | null;
|
|
||||||
}) {
|
|
||||||
if (!rank) {
|
|
||||||
return (
|
|
||||||
<CardShell title="Rank tracking">
|
|
||||||
<EmptyCardBody
|
|
||||||
message="Track your money keywords and watch your ranking improve over time."
|
|
||||||
cta={
|
|
||||||
<Link
|
|
||||||
to="/p/$projectId/rank-tracking"
|
|
||||||
params={{ projectId }}
|
|
||||||
className="btn btn-primary btn-sm"
|
|
||||||
>
|
|
||||||
Track your first keyword
|
|
||||||
</Link>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</CardShell>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<CardShell
|
|
||||||
title="Rank movement"
|
|
||||||
stamp={
|
|
||||||
rank.lastCheckedAt
|
|
||||||
? `Rank data · checked ${formatDay(rank.lastCheckedAt)} · vs 7 days ago`
|
|
||||||
: "Rank data · no completed checks yet"
|
|
||||||
}
|
|
||||||
action={
|
|
||||||
<Link
|
|
||||||
to="/p/$projectId/rank-tracking"
|
|
||||||
params={{ projectId }}
|
|
||||||
className={moreDetailsClass}
|
|
||||||
>
|
|
||||||
More details
|
|
||||||
</Link>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div className="grid grid-cols-2 gap-3">
|
|
||||||
<Stat label="Tracked" value={String(rank.trackedKeywords)} />
|
|
||||||
<Stat
|
|
||||||
label="Improved"
|
|
||||||
value={`▲ ${rank.improved}`}
|
|
||||||
tone={rank.improved > 0 ? "success" : undefined}
|
|
||||||
/>
|
|
||||||
<Stat
|
|
||||||
label="Declined"
|
|
||||||
value={`▼ ${rank.declined}`}
|
|
||||||
tone={rank.declined > 0 ? "error" : undefined}
|
|
||||||
/>
|
|
||||||
<Stat label="Top 10" value={String(rank.top10)} />
|
|
||||||
</div>
|
|
||||||
</CardShell>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function AuditHealthCard({
|
export function AuditHealthCard({
|
||||||
projectId,
|
projectId,
|
||||||
audit,
|
audit,
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import {
|
|||||||
AuditHealthCard,
|
AuditHealthCard,
|
||||||
BacklinkPulseCard,
|
BacklinkPulseCard,
|
||||||
GscCard,
|
GscCard,
|
||||||
RankMovementCard,
|
|
||||||
} from "@/client/features/dashboard/DashboardCards";
|
} from "@/client/features/dashboard/DashboardCards";
|
||||||
import { McpConnectCard } from "@/client/features/dashboard/McpConnectCard";
|
import { McpConnectCard } from "@/client/features/dashboard/McpConnectCard";
|
||||||
import { getStandardErrorMessage } from "@/client/lib/error-messages";
|
import { getStandardErrorMessage } from "@/client/lib/error-messages";
|
||||||
@ -33,7 +32,7 @@ const HERO_COPY: Record<
|
|||||||
> = {
|
> = {
|
||||||
domain: {
|
domain: {
|
||||||
title: "What site are you working on?",
|
title: "What site are you working on?",
|
||||||
body: "Set your project's domain and every card on this page starts working for it — backlinks, audits, rank tracking.",
|
body: "Set your project's domain and every card on this page starts working for it — backlinks and audits.",
|
||||||
cta: "Save",
|
cta: "Save",
|
||||||
},
|
},
|
||||||
mcp: {
|
mcp: {
|
||||||
@ -328,16 +327,6 @@ export function DashboardPage({ projectId }: { projectId: string }) {
|
|||||||
hasData: gscConnected,
|
hasData: gscConnected,
|
||||||
node: <GscCard projectId={projectId} connected={gscConnected} />,
|
node: <GscCard projectId={projectId} connected={gscConnected} />,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: "rank",
|
|
||||||
hasData: overview?.rank != null,
|
|
||||||
node: (
|
|
||||||
<RankMovementCard
|
|
||||||
projectId={projectId}
|
|
||||||
rank={overview?.rank ?? null}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: "audit",
|
key: "audit",
|
||||||
hasData: overview?.audit != null,
|
hasData: overview?.audit != null,
|
||||||
|
|||||||
@ -29,7 +29,7 @@ export type DashboardActivation = {
|
|||||||
competitorClickedAt: string | null;
|
competitorClickedAt: string | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DashboardRankSummary = {
|
type DashboardRankSummary = {
|
||||||
trackedKeywords: number;
|
trackedKeywords: number;
|
||||||
improved: number;
|
improved: number;
|
||||||
declined: number;
|
declined: number;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user