From 060c52bcabf7cbdda35efe5182f73325d2177408 Mon Sep 17 00:00:00 2001 From: Hiago Lucas Cardeal de Melo Silva Date: Tue, 29 Oct 2024 20:57:36 -0300 Subject: [PATCH] change moment where pickupPoint is cookied --- CHANGELOG.md | 4 ++++ react/hooks/useShippingOptions.ts | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfc32cb..62ca55a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Selected pickup doesn't work on first load + ## [0.4.0] - 2024-10-04 ### Fixed diff --git a/react/hooks/useShippingOptions.ts b/react/hooks/useShippingOptions.ts index afc17b6..88dbadb 100644 --- a/react/hooks/useShippingOptions.ts +++ b/react/hooks/useShippingOptions.ts @@ -139,8 +139,9 @@ const useShippingOptions = () => { await updateSession(inputZipCode, coordinates) + await fetchPickups(countryCode, inputZipCode, coordinates) + if (!reload) { - await fetchPickups(countryCode, inputZipCode, coordinates) setIsLoading(false) }