import { useNavigate } from "react-router-dom"; import Button from "./Button"; // import { formatNumber } from "../calc/formatNumber"; import { IAparmentRes } from "../types/apartmentsRes"; interface ApartmentSidebarProps { currentApartment: IAparmentRes; } const ApartmentSidebar = ({ currentApartment }: ApartmentSidebarProps) => { const navigate = useNavigate(); const unitNo = currentApartment.Unit_No.split("-")[1]; const wing = currentApartment.Unit_No.split("-")[0] === "E" ? "East Wing" : "West Wing"; const handleOn3DTourClick = () => { navigate(`../virtual-tour/${currentApartment.id}`); }; return (
View from window
Complex
{currentApartment.Project_Name}
Section
{wing}
Floor
{currentApartment.Floor}
Number
{unitNo}
Size
{Number(currentApartment.Total_Area_Sqft).toFixed(2)} Sqft
Unavailable {/* AED {formatNumber(1668888, ",", 3, 1)} */}