feat: trim for aplhabet sort

This commit is contained in:
2026-04-06 13:23:25 +03:00
parent a58f438dce
commit 4b02c6e9d3
25 changed files with 73 additions and 59 deletions

View File

@@ -171,7 +171,7 @@ class CityStore {
try {
// Create city in primary language
const cityPayload = {
name,
name: name.trim(),
country:
countryStore.countries[language as keyof CashedCountries]?.data.find(
(c) => c.code === country_code
@@ -200,7 +200,7 @@ class CityStore {
)?.name || "";
const patchPayload = {
name: secondaryName || "",
name: (secondaryName || "").trim(),
country: countryName,
country_code: country_code || "",
...(arms ? { arms } : {}),
@@ -285,7 +285,7 @@ class CityStore {
);
await languageInstance(language as Language).patch(`/city/${code}`, {
name,
name: (name || "").trim(),
country: country?.name || "",
country_code: country_code,
arms,