From 2b80b15fdab32ef5536a5f119cf2a4e108922304 Mon Sep 17 00:00:00 2001 From: oobjectt Date: Tue, 20 Dec 2022 21:59:19 +0100 Subject: [PATCH] Changing details --- .../pet-training/PetTrainingPanelWidgetView.tsx | 12 ++++++------ src/hooks/rooms/widgets/useAvatarInfoWidget.ts | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/room/widgets/pet-training/PetTrainingPanelWidgetView.tsx b/src/components/room/widgets/pet-training/PetTrainingPanelWidgetView.tsx index 08d8da71..170f2332 100644 --- a/src/components/room/widgets/pet-training/PetTrainingPanelWidgetView.tsx +++ b/src/components/room/widgets/pet-training/PetTrainingPanelWidgetView.tsx @@ -6,11 +6,11 @@ import { useAvatarInfoWidget, useMessageEvent } from '../../../../hooks'; export const PetTrainingPanelWidgetView: FC<{}> = props => { - const { avatarInfo = null, petTrainInformation = null, setTrainPetInformation = null } = useAvatarInfoWidget(); + const { avatarInfo = null, petTrainInformation = null, setPetTrainInformation = null } = useAvatarInfoWidget(); useMessageEvent(DesktopViewEvent, event => { - setTrainPetInformation(null); + setPetTrainInformation(null); }); useMessageEvent(PetTrainingPanelMessageEvent, event => @@ -19,7 +19,7 @@ export const PetTrainingPanelWidgetView: FC<{}> = props => if (!parser) return; - setTrainPetInformation(parser); + setPetTrainInformation(parser); }); const processPetAction = (petId: number, type: string) => @@ -33,20 +33,20 @@ export const PetTrainingPanelWidgetView: FC<{}> = props => return ( - setTrainPetInformation(null) } /> + setPetTrainInformation(null) } /> - { (avatarInfo as AvatarInfoPet)?.name } + { (avatarInfo as AvatarInfoPet)?.name } { (petTrainInformation.commands && petTrainInformation.commands.length > 0) && petTrainInformation.commands.map((command, index) => - + ) } diff --git a/src/hooks/rooms/widgets/useAvatarInfoWidget.ts b/src/hooks/rooms/widgets/useAvatarInfoWidget.ts index aacf50e5..afe46658 100644 --- a/src/hooks/rooms/widgets/useAvatarInfoWidget.ts +++ b/src/hooks/rooms/widgets/useAvatarInfoWidget.ts @@ -14,7 +14,7 @@ const useAvatarInfoWidgetState = () => const [ nameBubbles, setNameBubbles ] = useState([]); const [ productBubbles, setProductBubbles ] = useState([]); const [ confirmingProduct, setConfirmingProduct ] = useState(null); - const [ petTrainInformation, setTrainPetInformation ] = useState(null); + const [ petTrainInformation, setPetTrainInformation ] = useState(null); const [ pendingPetId, setPendingPetId ] = useState(-1); const [ isDecorating, setIsDecorating ] = useState(false); const { friends = [] } = useFriends(); @@ -66,7 +66,7 @@ const useAvatarInfoWidgetState = () => const getObjectInfo = (objectId: number, category: number) => { let info: IAvatarInfo = null; - setTrainPetInformation(null); + setPetTrainInformation(null); switch(category) { @@ -274,7 +274,7 @@ const useAvatarInfoWidgetState = () => useObjectDeselectedEvent(event => { setAvatarInfo(null); - setTrainPetInformation(null); + setPetTrainInformation(null); setProductBubbles([]); }); @@ -352,7 +352,7 @@ const useAvatarInfoWidgetState = () => roomSession.isDecorating = isDecorating; }, [ roomSession, isDecorating ]); - return { avatarInfo, setAvatarInfo, activeNameBubble, setActiveNameBubble, nameBubbles, productBubbles, confirmingProduct, petTrainInformation, setTrainPetInformation, isDecorating, setIsDecorating, removeNameBubble, removeProductBubble, updateConfirmingProduct, getObjectName }; + return { avatarInfo, setAvatarInfo, activeNameBubble, setActiveNameBubble, nameBubbles, productBubbles, confirmingProduct, petTrainInformation, setPetTrainInformation, isDecorating, setIsDecorating, removeNameBubble, removeProductBubble, updateConfirmingProduct, getObjectName }; } export const useAvatarInfoWidget = useAvatarInfoWidgetState;