Merge branch 'dev-zone' into dev-simulation/human
This commit is contained in:
@@ -206,13 +206,13 @@ export default function Dropped3dWidgets() {
|
||||
y = Math.max(y, 0);
|
||||
newWidget.position = [x, y, z];
|
||||
|
||||
// ✅ Prepare polygon from selectedZone.points
|
||||
const points3D = selectedZone.points as Array<[number, number, number]>;
|
||||
const zonePolygonXZ = points3D.map(
|
||||
([x, , z]) => [x, z] as [number, number]
|
||||
);
|
||||
// // ✅ Prepare polygon from selectedZone.points
|
||||
// const points3D = selectedZone.points as Array<[number, number, number]>;
|
||||
// const zonePolygonXZ = points3D.map(
|
||||
// ([x, , z]) => [x, z] as [number, number]
|
||||
// );
|
||||
|
||||
const isInside = isPointInPolygon([x, z], zonePolygonXZ);
|
||||
// const isInside = isPointInPolygon([x, z], zonePolygonXZ);
|
||||
|
||||
// ✅ Remove temp widget
|
||||
const prevWidgets =
|
||||
|
||||
@@ -210,10 +210,11 @@ const ReturnOfInvestment: React.FC<ReturnOfInvestmentProps> = ({
|
||||
if (response.message === "Widget not found") {
|
||||
return
|
||||
}
|
||||
|
||||
if (response) {
|
||||
setmeasurements(response.data.Data.measurements);
|
||||
setDuration(response.data.Data.duration);
|
||||
setName(response.data.widgetName);
|
||||
setmeasurements(response.Datastructure.measurements);
|
||||
setDuration(response.Datastructure.duration);
|
||||
setName(response.widgetName);
|
||||
}
|
||||
// try {
|
||||
// const response = await axios.get(
|
||||
|
||||
@@ -74,10 +74,10 @@ const UserAuth: React.FC = () => {
|
||||
} catch (error) {
|
||||
console.error("Error fetching recent projects:", error);
|
||||
}
|
||||
|
||||
|
||||
} else if (res.message === "User Not Found!!! Kindly signup...") {
|
||||
setError("Account not found");
|
||||
} else if (res.message === "Email & Password is invalid...Check the credentials") {
|
||||
setError(res.message)
|
||||
} else if (res.message === "Already LoggedIn on another browser....Please logout!!!") {
|
||||
setError("Already logged in on another browser. Please logout first.");
|
||||
navigate("/");
|
||||
|
||||
Reference in New Issue
Block a user