conflicts removed

This commit is contained in:
Gomathi 2025-03-27 18:10:49 +05:30
parent 40589b2fd8
commit f69b601785
1 changed files with 9 additions and 10 deletions

View File

@ -1,5 +1,8 @@
import React, { useEffect, useRef, useState, useCallback } from "react";
import { Widget } from "../../../store/useWidgetStore";
import { MoveArrowLeft, MoveArrowRight } from "../../icons/SimulationIcons";
import { InfoIcon } from "../../icons/ExportCommonIcons";
import { useDroppedObjectsStore } from "../../../store/useDroppedObjectsStore";
// Define the type for `Side`
type Side = "top" | "bottom" | "left" | "right";
@ -60,16 +63,12 @@ const DisplayZone: React.FC<DisplayZoneProps> = ({
// Ref for the container element
const containerRef = useRef<HTMLDivElement | null>(null);
// Example state for selectedOption and options (adjust based on your actual use case)
const [selectedOption, setSelectedOption] = React.useState<string | null>(
null
);
// console.log('setSelectedOption: ', setSelectedOption);
const [options, setOptions] = React.useState<string[]>([]);
// console.log('setOptions: ', setOptions);
// State to track overflow visibility
const [showLeftArrow, setShowLeftArrow] = useState(false);
const [showRightArrow, setShowRightArrow] = useState(false);
// Scroll to the selected option when it changes
useEffect(() => {
// Function to calculate overflow state
const updateOverflowState = useCallback(() => {
const container = containerRef.current;
if (container) {
@ -165,7 +164,7 @@ const DisplayZone: React.FC<DisplayZoneProps> = ({
selectedZone.zoneName === zoneName ? "active" : ""
}`}
onClick={() => {
console.log("zoneName: ", zoneName);
useDroppedObjectsStore.getState().setZone(zoneName, zonesData[zoneName]?.zoneId);
setSelectedZone({
zoneName,
activeSides: zonesData[zoneName].activeSides || [],