diff --git a/src/components/room/widgets/avatar-info/infostand/InfoStandBadgeSlotView.tsx b/src/components/room/widgets/avatar-info/infostand/InfoStandBadgeSlotView.tsx
index 951df53..6a504d2 100644
--- a/src/components/room/widgets/avatar-info/infostand/InfoStandBadgeSlotView.tsx
+++ b/src/components/room/widgets/avatar-info/infostand/InfoStandBadgeSlotView.tsx
@@ -1,5 +1,6 @@
import { FC, useCallback, useEffect, useRef, useState } from 'react';
import { FaPlus } from 'react-icons/fa';
+import { LocalizeText } from '../../../../../api';
import { LayoutBadgeImageView } from '../../../../../common';
import { useInventoryBadges } from '../../../../../hooks';
@@ -49,13 +50,13 @@ const BadgeMiniPicker: FC<{
setSearch(e.target.value) }
/>
{ badgeCodes.length === 0
- ? Caricamento...
+ ? { LocalizeText('generic.loading') }
: (
{ filtered.slice(0, 40).map(code => (
@@ -67,7 +68,7 @@ const BadgeMiniPicker: FC<{
)) }
{ filtered.length === 0 && (
- Nessun badge
+ { LocalizeText('generic.no_results_found') }
) }
) }
@@ -81,8 +82,6 @@ export const InfoStandBadgeSlotView: FC = ({ slotIndex,
const [ isDragOver, setIsDragOver ] = useState(false);
const [ showPicker, setShowPicker ] = useState(false);
- // For own user: use hook data if loaded, otherwise fall back to props (avatarInfo)
- // For other users: always use props
const hookBadge = activeBadgeCodes.length > 0 ? (activeBadgeCodes[slotIndex] ?? null) : null;
const badgeCode = isOwnUser ? (hookBadge ?? badgeCodeFromProps ?? null) : (badgeCodeFromProps ?? null);
@@ -117,14 +116,12 @@ export const InfoStandBadgeSlotView: FC = ({ slotIndex,
if(sourceSlotStr !== '')
{
- // Dragged from another infostand slot -> always swap (works with empty slots too)
const sourceSlot = parseInt(sourceSlotStr);
if(sourceSlot !== slotIndex) swapBadges(sourceSlot, slotIndex);
}
else
{
- // Dragged from inventory or external -> place at this slot
setBadgeAtSlot(droppedBadgeCode, slotIndex);
}
}, [ isOwnUser, slotIndex, swapBadges, setBadgeAtSlot ]);