Skip to content

Commit e98ecd4

Browse files
authored
fix(website): unbreak TS build (AnalyticsSurface + Button anchorAttrs) (#274)
* fix(website): add 'home_whitepaper' to AnalyticsSurface WhitePaperBlock.tsx passes 'home_whitepaper' as the surface property when tracking signup submissions, but the AnalyticsSurface union did not include that value — causing TS2322 build failures on main since the Statusbrew website refactor landed (#270). This is blocking unrelated PRs from merging because Website lint is a required check. * fix(website): remove redundant cast that re-introduces href on anchorAttrs The 'rest as AnchorButtonProps' cast on line 115 contradicted the prior destructure on line 106 that pulled 'href' out — TS then inferred that anchorAttrs still had 'href', conflicting with the explicit href={href} JSX prop. Result: TS2783 'href is specified more than once' build failure since the Statusbrew website refactor (#270). Removing the redundant cast lets TS infer anchorAttrs from the runtime- true type (rest without href).
1 parent fefe825 commit e98ecd4

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

apps/website/src/components/ui/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export function Button(props: ButtonProps) {
112112
className: _cn,
113113
style: _st,
114114
...anchorAttrs
115-
} = rest as AnchorButtonProps;
115+
} = rest;
116116
return (
117117
<a
118118
href={href}

apps/website/src/lib/analytics/events.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export type AnalyticsSurface =
2626
| 'mobile_nav'
2727
| 'footer'
2828
| 'home'
29+
| 'home_whitepaper'
2930
| 'pricing'
3031
| 'docs'
3132
| 'library_landing'

0 commit comments

Comments
 (0)