fmt
Some checks failed
CI / Check (push) Failing after 4m14s
Build and publish Docker image / build-and-push (push) Successful in 4m52s

This commit is contained in:
Andras Schmelczer 2026-07-14 14:04:44 +01:00
parent cf348c3ea4
commit d1faad314b
14 changed files with 55 additions and 35 deletions

View file

@ -24,10 +24,7 @@ export default function ResetPasswordPage({
onClearError: () => void;
}) {
const { t } = useTranslation();
const token = useMemo(
() => new URLSearchParams(window.location.search).get('token') ?? '',
[]
);
const token = useMemo(() => new URLSearchParams(window.location.search).get('token') ?? '', []);
const [password, setPassword] = useState('');
const [showPassword, setShowPassword] = useState(false);
const [done, setDone] = useState(false);
@ -60,7 +57,9 @@ export default function ResetPasswordPage({
{!token ? (
<div className="space-y-4">
<p className="text-sm text-warm-600 dark:text-warm-300">{t('auth.resetMissingToken')}</p>
<p className="text-sm text-warm-600 dark:text-warm-300">
{t('auth.resetMissingToken')}
</p>
<button type="button" onClick={onLoginClick} className={loginButtonClass}>
{t('auth.goToLogin')}
</button>

View file

@ -307,7 +307,9 @@ export function ActiveFilterList({
dragValue={dragValue}
pinnedFeature={pinnedFeature}
filterImpact={councilBackendName ? filterImpacts?.[councilBackendName] : undefined}
percentileScale={councilBackendName ? percentileScales.get(councilBackendName) : undefined}
percentileScale={
councilBackendName ? percentileScales.get(councilBackendName) : undefined
}
onFilterChange={onFilterChange}
onDragStart={onDragStart}
onDragChange={onDragChange}

View file

@ -42,7 +42,8 @@ const FOLDED_FILTER_RESOLVERS: Array<(name: string) => string | null> = [
(name) => (isQualificationFilterName(name) ? QUALIFICATIONS_FILTER_NAME : null),
(name) => (isTenureFilterName(name) ? TENURE_FILTER_NAME : null),
(name) => (isCouncilFilterName(name) ? COUNCIL_FILTER_NAME : null),
(name) => (isPoiDistanceFilterName(name) ? (getPoiFilterName(name) ?? POI_DISTANCE_FILTER_NAME) : null),
(name) =>
isPoiDistanceFilterName(name) ? (getPoiFilterName(name) ?? POI_DISTANCE_FILTER_NAME) : null,
(name) => (isCrimeSeverityFilterName(name) ? (getCrimeSeverityFilterName(name) ?? name) : null),
];

View file

@ -215,7 +215,10 @@ export function useFilters({
const normalizedOriginal = normalizeFilters(initialFilters);
originalNormalizedRef.current = normalizedOriginal;
const budget = filterLimit != null ? Math.max(0, filterLimit - reservedFilterSlots) : null;
initialFiltersRef.current = clampToBudget(dropUnknownFilters(normalizedOriginal, features), budget);
initialFiltersRef.current = clampToBudget(
dropUnknownFilters(normalizedOriginal, features),
budget
);
}
const [filters, setFilters] = useState<FeatureFilters>(() => initialFiltersRef.current!);

View file

@ -42,7 +42,10 @@ async function detectSessionRejection(
onSessionRejected?: () => void
): Promise<void> {
if (res.status !== 400 || !onSessionRejected || !pb.authStore.isValid) return;
const body = await res.clone().json().catch(() => null);
const body = await res
.clone()
.json()
.catch(() => null);
if (body && (body as { error?: string }).error === 'filter_limit') {
onSessionRejected();
}

View file

@ -97,7 +97,8 @@ const descriptions: Record<string, Record<string, string>> = {
'% Private rent': 'Part des ménages locataires dans le privé ou logés à titre gratuit',
'% Council housing':
'Part des logements du code postal déjà enregistrés comme logement municipal ou social',
'% Ex-council': 'Part des logements du code postal autrefois municipaux mais qui ne le sont plus',
'% Ex-council':
'Part des logements du code postal autrefois municipaux mais qui ne le sont plus',
'% White': 'Part de la population sidentifiant comme blanche',
'% South Asian': 'Part de la population sidentifiant comme sud-asiatique',
'% Black': 'Part de la population sidentifiant comme noire',

View file

@ -635,7 +635,8 @@ const hi: Translations = {
updatePassword: 'पासवर्ड अपडेट करें',
resetSuccessBody: 'आपका पासवर्ड बदल दिया गया है। अब आप अपने नए पासवर्ड से लॉग इन कर सकते हैं।',
resetMissingToken: 'यह रीसेट लिंक अधूरा है। लॉग इन स्क्रीन से नया लिंक प्राप्त करें।',
resetInvalidLink: 'यह रीसेट लिंक अमान्य है या समाप्त हो चुका है। लॉग इन स्क्रीन से नया लिंक प्राप्त करें।',
resetInvalidLink:
'यह रीसेट लिंक अमान्य है या समाप्त हो चुका है। लॉग इन स्क्रीन से नया लिंक प्राप्त करें।',
goToLogin: 'लॉग इन पर जाएँ',
},

View file

@ -651,8 +651,7 @@ const hu: Translations = {
newPassword: 'Új jelszó',
newPasswordPlaceholder: 'Legalább 8 karakter',
updatePassword: 'Jelszó frissítése',
resetSuccessBody:
'A jelszavad megváltozott. Mostantól bejelentkezhetsz az új jelszavaddal.',
resetSuccessBody: 'A jelszavad megváltozott. Mostantól bejelentkezhetsz az új jelszavaddal.',
resetMissingToken:
'Ez a jelszó-visszaállító link hiányos. Kérj egy újat a bejelentkezési képernyőről.',
resetInvalidLink: