Skip to content

Commit

Permalink
Fix default radius not working
Browse files Browse the repository at this point in the history
  • Loading branch information
devcshort committed Aug 12, 2024
1 parent ff83d23 commit 684801f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions bin/createAppFromStrapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = async function createFromStrapi(dir) {
headers: {
Authorization: `Bearer ${STRAPI_TOKEN}`,
},
}
},
);

const data = res.body.data;
Expand Down Expand Up @@ -114,7 +114,7 @@ module.exports = async function createFromStrapi(dir) {
feedbackUrl: appConfig.feedbackUrl,
},
search: {
defaultRadius: appConfig?.defaultRadius ?? 0,
defaultRadius: appConfig?.defaultRadiusValue ?? 0,
radiusOptions: appConfig?.radiusSelectValues ?? null,
},
features: {
Expand Down Expand Up @@ -299,14 +299,14 @@ module.exports = async function createFromStrapi(dir) {

fs.writeFileSync(
path.join(dir, 'tmp/app.json'),
JSON.stringify(newAppConfig, null, 2)
JSON.stringify(newAppConfig, null, 2),
);

for (const key in translationFile) {
fs.mkdirpSync(path.join(dir, `public/locales/${key}`));
fs.writeFileSync(
path.join(dir, `public/locales/${key}/dynamic.json`),
JSON.stringify(translationFile[key], null, 2)
JSON.stringify(translationFile[key], null, 2),
);
}
} catch (err) {
Expand Down
6 changes: 3 additions & 3 deletions src/components/molecules/LocationAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function LocationAutocomplete(props: Props) {

toggle(false);
},
[setValue, toggle, t, setCoords]
[setValue, toggle, t, setCoords],
);

const getUserLocation = useCallback(() => {
Expand Down Expand Up @@ -140,7 +140,7 @@ export function LocationAutocomplete(props: Props) {

(async function () {
const res = await fetch(
`/api/geocode?address=${debounced}&autocomplete=true`
`/api/geocode?address=${debounced}&autocomplete=true`,
);
const data = await res.json();

Expand All @@ -150,7 +150,7 @@ export function LocationAutocomplete(props: Props) {
group: t('search.suggestions'),
group_label: 'Suggestions',
coordinates: el.center,
})) ?? []
})) ?? [],
);
})();
}, [debounced, t]);
Expand Down

0 comments on commit 684801f

Please sign in to comment.