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 (
|
||||
<div className="space-y-5">
|
||||
<Panel
|
||||
title="Competitor analysis"
|
||||
action={<div className="flex flex-wrap gap-2">
|
||||
title="Find & compare competitors"
|
||||
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>
|
||||
<Button variant="primary" icon={Sparkles} loading={busy} onClick={scan}>Find competitors</Button>
|
||||
</div>}
|
||||
>
|
||||
<p className="text-[13px] text-muted">
|
||||
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} />
|
||||
{error && <div className="p-4"><ErrorNote error={error} /></div>}
|
||||
</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>} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function Documents({ slug, docs, reload, openPath, empty }) {
|
||||
function Documents({ slug, docs, reload, openPath, empty, labels }) {
|
||||
const [preview, setPreview] = useState(null);
|
||||
const [busy, setBusy] = useState(null);
|
||||
const [error, setError] = useState(null);
|
||||
@ -466,7 +463,7 @@ function Documents({ slug, docs, reload, openPath, empty }) {
|
||||
<div className="space-y-5">
|
||||
<ErrorNote error={error} />
|
||||
{groups.map(([kind, list]) => (
|
||||
<Panel key={kind} title={KIND_LABEL[kind]}>
|
||||
<Panel key={kind} title={labels?.[kind] || KIND_LABEL[kind]}>
|
||||
<table className="tbl">
|
||||
<tbody>
|
||||
{list.map((d) => (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user