feat: Add selected city functional with some debugging

This commit is contained in:
2025-10-22 03:04:58 +03:00
parent 9e47ab667f
commit 50ad374cf5
14 changed files with 430 additions and 175 deletions

View File

@@ -33,15 +33,8 @@ export function MediaViewer({
string | number | null
>(null);
// Сбрасываем ключ при смене медиа
useEffect(() => {
if (media?.id !== previousMediaId) {
console.log("🔄 MediaViewer: Смена медиа, сброс ключа", {
previousMediaId,
newMediaId: media?.id,
mediaType: media?.media_type,
});
// Используем новый cache manager для очистки кеша
clearMediaTransitionCache(
previousMediaId,
@@ -55,16 +48,9 @@ export function MediaViewer({
}, [media?.id, media?.media_type, previousMediaId]);
const handleReset = () => {
console.log("🔄 MediaViewer: handleReset вызван", {
currentResetKey: resetKey,
mediaId: media?.id,
});
setResetKey((prev) => {
const newKey = prev + 1;
console.log("🔄 MediaViewer: resetKey обновлен", {
oldKey: prev,
newKey,
});
return newKey;
});
};