Skip to content

Commit 136f2f9

Browse files
committed
fix(types): correct promise resolution typing in useGeoPricing
1 parent 2489630 commit 136f2f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

frontend/hooks/useGeoPricing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function useGeoPricing() {
1919
}
2020

2121
fetch('https://ipapi.co/json/')
22-
.then(res => res.json())
22+
.then(res => res.json() as Promise<{ country_code?: string }>)
2323
.then(data => {
2424
const detectedCurrency = data.country_code === 'IN' ? 'INR' : 'USD';
2525
setCurrency(detectedCurrency);

0 commit comments

Comments
 (0)