Skip to content

Commit

Permalink
fix trailingZeroDisplay ts error
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey committed Jan 4, 2025
1 parent b009b16 commit e933f60
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ function Stat({
) : (
<NumberFlow
value={isCurrency ? value! / 100 : value || 0}
{...(isCurrency
? {
format: {
format={
isCurrency
? {
style: "currency",
currency: "USD",
// @ts-ignore – this is a valid option but TS is outdated
// @ts-ignore – trailingZeroDisplay is a valid option but TS is outdated
trailingZeroDisplay: "stripIfInteger",
},
}
: {})}
}
: undefined
}
/>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function UsageTabCard({
? {
style: "currency",
currency: "USD",
// @ts-ignore – this is a valid option but TS is outdated
// @ts-ignore – trailingZeroDisplay is a valid option but TS is outdated
trailingZeroDisplay: "stripIfInteger",
}
: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function EarningsChart() {
format={{
style: "currency",
currency: "USD",
// @ts-ignore – this is a valid option but TS is outdated
// @ts-ignore – trailingZeroDisplay is a valid option but TS is outdated
trailingZeroDisplay: "stripIfInteger",
}}
/>
Expand Down Expand Up @@ -354,7 +354,7 @@ function StatCard({
format={{
style: "currency",
currency: "USD",
// @ts-ignore – this is a valid option but TS is outdated
// @ts-ignore – trailingZeroDisplay is a valid option but TS is outdated
trailingZeroDisplay: "stripIfInteger",
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/ui/analytics/bar-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export function LineItem({
? {
style: "currency",
currency: "USD",
// @ts-ignore – this is a valid option but TS is outdated
// @ts-ignore – trailingZeroDisplay is a valid option but TS is outdated
trailingZeroDisplay: "stripIfInteger",
}
: {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/ui/analytics/events/events-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default function EventsTabs({
? {
style: "currency",
currency: "USD",
// @ts-ignore – this is a valid option but TS is outdated
// @ts-ignore – trailingZeroDisplay is a valid option but TS is outdated
trailingZeroDisplay: "stripIfInteger",
}
: {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/ui/analytics/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default function Main() {
? {
style: "currency",
currency: "USD",
// @ts-ignore – this is a valid option but TS is outdated
// @ts-ignore – trailingZeroDisplay is a valid option but TS is outdated
trailingZeroDisplay: "stripIfInteger",
}
: {
Expand Down

0 comments on commit e933f60

Please sign in to comment.