From 6df2812a4ebcac310ca44a12223cbdfe1cef88be Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sun, 12 Jul 2026 15:31:05 +0100 Subject: [PATCH] Rename and purple instant --- frontend/src/hooks/useClickedListings.ts | 6 ++++-- frontend/src/hooks/useListingLayers.ts | 8 ++++++-- frontend/src/i18n/locales/de.ts | 4 +++- frontend/src/i18n/locales/en.ts | 4 +++- frontend/src/i18n/locales/fr.ts | 4 +++- frontend/src/i18n/locales/hi.ts | 4 +++- frontend/src/i18n/locales/hu.ts | 4 +++- frontend/src/i18n/locales/zh.ts | 4 +++- 8 files changed, 28 insertions(+), 10 deletions(-) diff --git a/frontend/src/hooks/useClickedListings.ts b/frontend/src/hooks/useClickedListings.ts index 6ca81f6..9804a78 100644 --- a/frontend/src/hooks/useClickedListings.ts +++ b/frontend/src/hooks/useClickedListings.ts @@ -14,8 +14,10 @@ function currentUserId(): string | null { * * Reads the user from the shared PocketBase authStore so it stays self-contained, with no need to * thread a user id down through the map layer tree. Returns a Set for O(1) membership checks in - * the map's colour accessor; a fresh Set instance is produced on every change so it can double - * as a deck.gl `updateTrigger` (identity-compared). + * the map's colour accessor; a fresh Set instance is produced on every change so React re-renders. + * Note: a Set can NOT be used directly as a deck.gl `updateTrigger` — deck diffs triggers with + * `compareProps`, which finds no enumerable keys on a Set and reports "no change". Callers must + * pass `Array.from(clickedUrls)` (or a version counter) as the trigger instead. * * Writes are optimistic: `markClicked` updates local state synchronously so the pin recolours * the instant it is clicked, independent of the PocketBase round-trip or the next listings fetch. diff --git a/frontend/src/hooks/useListingLayers.ts b/frontend/src/hooks/useListingLayers.ts index 581974d..bd264e1 100644 --- a/frontend/src/hooks/useListingLayers.ts +++ b/frontend/src/hooks/useListingLayers.ts @@ -385,7 +385,9 @@ export function useListingLayers({ listings, zoom, isDark }: UseListingLayersPro highlightColor: [29, 228, 195, 220], onHover: stableHover, onClick: stableClick, - updateTriggers: { getFillColor: clickedUrls }, + // deck.gl can't diff a Set (no enumerable keys), so a click never + // re-runs getFillColor until data changes. Feed it a diffable array. + updateTriggers: { getFillColor: Array.from(clickedUrls) }, }), [visibleListings, clickedUrls, stableHover, stableClick] ); @@ -483,7 +485,9 @@ export function useListingLayers({ listings, zoom, isDark }: UseListingLayersPro highlightColor: [29, 228, 195, 220], onHover: stableExpandedHover, onClick: stableExpandedClick, - updateTriggers: { getFillColor: clickedUrls }, + // deck.gl can't diff a Set (no enumerable keys), so a click never + // re-runs getFillColor until data changes. Feed it a diffable array. + updateTriggers: { getFillColor: Array.from(clickedUrls) }, }), [expandedListings, clickedUrls, stableExpandedHover, stableExpandedClick] ); diff --git a/frontend/src/i18n/locales/de.ts b/frontend/src/i18n/locales/de.ts index 28a35fa..251501b 100644 --- a/frontend/src/i18n/locales/de.ts +++ b/frontend/src/i18n/locales/de.ts @@ -42,7 +42,7 @@ const de: Translations = { minute: 'Min.', or: 'oder', area: 'Gebiet', - properties: 'Immobilien', + properties: 'Verkaufte Immobilien', postcode: 'Postcode', noAreaSelected: 'Kein Gebiet ausgewählt', noAreaSelectedDesc: @@ -631,6 +631,8 @@ const de: Translations = { email: 'E-Mail', emailPlaceholder: 'name@beispiel.de', password: 'Passwort', + showPassword: 'Passwort anzeigen', + hidePassword: 'Passwort verbergen', passwordPlaceholderRegister: 'Mind. 8 Zeichen', passwordPlaceholderLogin: 'Dein Passwort', forgotPassword: 'Passwort vergessen?', diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index 5ff6029..e23cc4e 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -38,7 +38,7 @@ const en = { minute: 'min', or: 'or', area: 'Area', - properties: 'Properties', + properties: 'Sold properties', postcode: 'Postcode', noAreaSelected: 'No area selected', noAreaSelectedDesc: @@ -618,6 +618,8 @@ const en = { email: 'Email', emailPlaceholder: 'you@example.com', password: 'Password', + showPassword: 'Show password', + hidePassword: 'Hide password', passwordPlaceholderRegister: 'Min 8 characters', passwordPlaceholderLogin: 'Your password', forgotPassword: 'Forgot password?', diff --git a/frontend/src/i18n/locales/fr.ts b/frontend/src/i18n/locales/fr.ts index a1d8bdf..36fe27b 100644 --- a/frontend/src/i18n/locales/fr.ts +++ b/frontend/src/i18n/locales/fr.ts @@ -40,7 +40,7 @@ const fr: Translations = { minute: 'min', or: 'ou', area: 'Secteur', - properties: 'Biens', + properties: 'Biens vendus', postcode: 'Code postal', noAreaSelected: 'Aucun secteur sélectionné', noAreaSelectedDesc: @@ -642,6 +642,8 @@ const fr: Translations = { email: 'E-mail', emailPlaceholder: 'vous@exemple.com', password: 'Mot de passe', + showPassword: 'Afficher le mot de passe', + hidePassword: 'Masquer le mot de passe', passwordPlaceholderRegister: '8 caractères minimum', passwordPlaceholderLogin: 'Votre mot de passe', forgotPassword: 'Mot de passe oublié ?', diff --git a/frontend/src/i18n/locales/hi.ts b/frontend/src/i18n/locales/hi.ts index 3ac524a..3a3891d 100644 --- a/frontend/src/i18n/locales/hi.ts +++ b/frontend/src/i18n/locales/hi.ts @@ -39,7 +39,7 @@ const hi: Translations = { minute: 'मिनट', or: 'या', area: 'क्षेत्र', - properties: 'प्रॉपर्टीज़', + properties: 'बिकी हुई प्रॉपर्टीज़', postcode: 'पोस्टकोड', noAreaSelected: 'कोई क्षेत्र चुना नहीं गया', noAreaSelectedDesc: @@ -615,6 +615,8 @@ const hi: Translations = { email: 'ईमेल', emailPlaceholder: 'you@example.com', password: 'पासवर्ड', + showPassword: 'पासवर्ड दिखाएं', + hidePassword: 'पासवर्ड छिपाएं', passwordPlaceholderRegister: 'कम से कम 8 अक्षर', passwordPlaceholderLogin: 'आपका पासवर्ड', forgotPassword: 'पासवर्ड भूल गए?', diff --git a/frontend/src/i18n/locales/hu.ts b/frontend/src/i18n/locales/hu.ts index 86e588e..08c19de 100644 --- a/frontend/src/i18n/locales/hu.ts +++ b/frontend/src/i18n/locales/hu.ts @@ -40,7 +40,7 @@ const hu: Translations = { minute: 'perc', or: 'vagy', area: 'Terület', - properties: 'Ingatlanok', + properties: 'Eladott ingatlanok', postcode: 'Irányítószám', noAreaSelected: 'Nincs kiválasztott terület', noAreaSelectedDesc: @@ -633,6 +633,8 @@ const hu: Translations = { email: 'E-mail', emailPlaceholder: 'te@pelda.hu', password: 'Jelszó', + showPassword: 'Jelszó megjelenítése', + hidePassword: 'Jelszó elrejtése', passwordPlaceholderRegister: 'Minimum 8 karakter', passwordPlaceholderLogin: 'Jelszavad', forgotPassword: 'Elfelejtetted a jelszavad?', diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts index 1eb623d..f0c2c9d 100644 --- a/frontend/src/i18n/locales/zh.ts +++ b/frontend/src/i18n/locales/zh.ts @@ -40,7 +40,7 @@ const zh: Translations = { minute: '分钟', or: '或', area: '区域', - properties: '房产', + properties: '已售房产', postcode: '邮编', noAreaSelected: '未选择区域', noAreaSelectedDesc: '点击地图上的任意彩色区域,查看治安、学校、房价等信息', @@ -579,6 +579,8 @@ const zh: Translations = { email: '邮箱', emailPlaceholder: 'you@example.com', password: '密码', + showPassword: '显示密码', + hidePassword: '隐藏密码', passwordPlaceholderRegister: '至少 8 个字符', passwordPlaceholderLogin: '您的密码', forgotPassword: '忘记密码?',