zone camera updation and builder zoneadatas

This commit is contained in:
2025-03-26 18:30:33 +05:30
parent 5cc3b83e43
commit 82aabc2004
18 changed files with 472 additions and 175 deletions

View File

@@ -1,9 +1,11 @@
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import RenameInput from "../../../ui/inputs/RenameInput";
import Vector3Input from "../customInput/Vector3Input";
import { useSelectedZoneStore } from "../../../../store/useZoneStore";
const ZoneProperties: React.FC = () => {
const [Edit, setEdit] = useState(false);
const { selectedZone, setSelectedZone } = useSelectedZoneStore();
function handleSetView() {
setEdit(false);
@@ -16,17 +18,21 @@ const ZoneProperties: React.FC = () => {
setEdit(true);
}
}
useEffect(() => {
console.log(' selectedZone.zoneName: ', selectedZone.zoneName);
}, [selectedZone])
return (
<div className="zone-properties-container">
<div className="header">
<RenameInput value="Selected Zone Name" />
<RenameInput value={selectedZone.zoneName ? selectedZone.zoneName : ""} />
<div className="button" onClick={handleEditView}>
{Edit ? "Cancel" : "Edit"}
</div>
</div>
<Vector3Input onChange={() => {}} header="Viewport Target" />
<Vector3Input onChange={() => {}} header="Viewport Position" />
<Vector3Input onChange={() => { }} header="Viewport Target" />
<Vector3Input onChange={() => { }} header="Viewport Position" />
{Edit && (
<div className="button-save" onClick={handleSetView}>
Set View