Competitor analysis tab: description in the panel header, no repeated title
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ef574be75f
commit
3aff447011
@ -408,25 +408,22 @@ function CompetitorReports({ slug, docs, reload, openPath, onStarted }) {
|
|||||||
return (
|
return (
|
||||||
<div className="space-y-5">
|
<div className="space-y-5">
|
||||||
<Panel
|
<Panel
|
||||||
title="Competitor analysis"
|
title="Find & compare competitors"
|
||||||
action={<div className="flex flex-wrap gap-2">
|
subtitle="Finds local rivals and niche benchmarks, checks them on Instagram and Google, and rewrites this month's report. Track or dismiss the accounts it suggests under Tracked accounts."
|
||||||
|
action={<div className="flex flex-wrap gap-2 shrink-0">
|
||||||
<Link to={`/competitors?client=${encodeURIComponent(slug)}`}><Button icon={ArrowUpRight}>Tracked accounts</Button></Link>
|
<Link to={`/competitors?client=${encodeURIComponent(slug)}`}><Button icon={ArrowUpRight}>Tracked accounts</Button></Link>
|
||||||
<Button variant="primary" icon={Sparkles} loading={busy} onClick={scan}>Find competitors</Button>
|
<Button variant="primary" icon={Sparkles} loading={busy} onClick={scan}>Find competitors</Button>
|
||||||
</div>}
|
</div>}
|
||||||
>
|
>
|
||||||
<p className="text-[13px] text-muted">
|
{error && <div className="p-4"><ErrorNote error={error} /></div>}
|
||||||
Each run finds this client's local rivals and niche benchmarks, checks them on Instagram and Google, and rewrites this month's report.
|
|
||||||
Add or dismiss the accounts it suggests under Tracked accounts.
|
|
||||||
</p>
|
|
||||||
<ErrorNote error={error} />
|
|
||||||
</Panel>
|
</Panel>
|
||||||
<Documents slug={slug} docs={docs} reload={reload} openPath={openPath}
|
<Documents slug={slug} docs={docs} reload={reload} openPath={openPath} labels={{ competitors: "Reports" }}
|
||||||
empty={<Empty icon={FileBarChart} title="No competitor reports yet">Click Find competitors to create the first one.</Empty>} />
|
empty={<Empty icon={FileBarChart} title="No competitor reports yet">Click Find competitors to create the first one.</Empty>} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Documents({ slug, docs, reload, openPath, empty }) {
|
function Documents({ slug, docs, reload, openPath, empty, labels }) {
|
||||||
const [preview, setPreview] = useState(null);
|
const [preview, setPreview] = useState(null);
|
||||||
const [busy, setBusy] = useState(null);
|
const [busy, setBusy] = useState(null);
|
||||||
const [error, setError] = useState(null);
|
const [error, setError] = useState(null);
|
||||||
@ -466,7 +463,7 @@ function Documents({ slug, docs, reload, openPath, empty }) {
|
|||||||
<div className="space-y-5">
|
<div className="space-y-5">
|
||||||
<ErrorNote error={error} />
|
<ErrorNote error={error} />
|
||||||
{groups.map(([kind, list]) => (
|
{groups.map(([kind, list]) => (
|
||||||
<Panel key={kind} title={KIND_LABEL[kind]}>
|
<Panel key={kind} title={labels?.[kind] || KIND_LABEL[kind]}>
|
||||||
<table className="tbl">
|
<table className="tbl">
|
||||||
<tbody>
|
<tbody>
|
||||||
{list.map((d) => (
|
{list.map((d) => (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user