Component Change Diff
ASecurityBoth charts are dumb — they just render whatever `data` they're handed. The single choke point is one hook call in the dashboard page. **Component tree:** ``` Dashboard (src/pages/Dashboard.tsx) ├── Header ├── RevenueChart ← props: any, just renders data={revenue} ├── SignupsChart ← props: any, just renders data={signups} └── RecentOrders ``` **Where the 30-day lock-in lives today** — `src/pages/Dashboard.tsx:8`: ```tsx const { revenue, signups } = useMetrics({ days: 30 }); ``` `useMetric...
- 17 stars
- 0 votes
- 0 copies
- 0 views
- Added September 25, 2026
Security analysis
100/100Pro scans all 3 files and shows the line behind each finding
npx -y skills add bendrucker/claude --skill component-change-diff --agent claude-codeAre you the author of Component Change Diff?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/bendrucker-component-change-diff)Both charts are dumb — they just render whatever `data` they're handed. The single choke point is one hook call in the dashboard page.
**Component tree:**
```
Dashboard (src/pages/Dashboard.tsx)
├── Header
├── RevenueChart ← props: any, just renders data={revenue}
├── SignupsChart ← props: any, just renders data={signups}
└── RecentOrders
```
**Where the 30-day lock-in lives today** — `src/pages/Dashboard.tsx:8`:
```tsx
const { revenue, signups } = useMetrics({ days: 30 });
```
`useMetrics({ days })` (`src/hooks/useMetrics.ts:1`) is the only place a date range exists in the codebase — there's no context, URL param, or store carrying it anywhere else.
**Diff — where the picker goes:**
```diff
Dashboard (src/pages/Dashboard.tsx)
+ const [range, setRange] = useState({ days: 30 })
+ <DateRangePicker value={range} onChange={setRange} />
<Header />
- const { revenue, signups } = useMetrics({ days: 30 });
+ const { revenue, signups } = useMetrics(range);
<RevenueChart data={revenue} />
<SignupsChart data={signups} />
<RecentOrders />
```
Because both charts only ever receive already-filtered `data` props, adding the picker's state at the `Dashboard` level and feeding it into the existing `useMetrics(range)` call is the only wiring needed — no changes to `RevenueChart`/`SignupsChart` themselves, and no context/store to introduce.
Files in this skill
- sonnet-plain.md
- sonnet-skill.md
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.