refactor: Clean up console log statements and improve component state management in SideBarRight, AssetProperties, WallInstances, WallCreator, and SocketResponses

This commit is contained in:
2025-07-02 11:52:57 +05:30
parent 0848c453af
commit 3f59f5d2dd
6 changed files with 135 additions and 143 deletions

View File

@@ -6,7 +6,6 @@ import PositionInput from "../customInput/PositionInputs";
import RotationInput from "../customInput/RotationInput";
import { useSelectedFloorItem, useObjectPosition, useObjectRotation } from "../../../../store/builder/store";
import { useSceneContext } from "../../../../modules/scene/sceneContext";
import { center } from "@turf/turf";
interface UserData {
id: number; // Unique identifier for the user data
@@ -52,11 +51,14 @@ const AssetProperties: React.FC = () => {
};
const handleAnimationClick = (animation: string) => {
if (selectedFloorItem) {
if (selectedFloorItem && selectedFloorItem.animationState) {
const isPlaying = selectedFloorItem.animationState?.playing || false;
setCurrentAnimation(selectedFloorItem.uuid, animation, !isPlaying);
}
}
if (!selectedFloorItem) return null;
return (
<div className="asset-properties-container">
{/* Name */}