This commit is contained in:
2024-07-10 14:23:11 +05:00
parent 2e43573e02
commit 755718417d
6 changed files with 24 additions and 10 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
// const serverApi = "http://192.168.56.1:4003";
const serverApi = import.meta.env.VITE_SERVER_API;
const serverApi = "http://192.168.56.1:4003";
// const serverApi = import.meta.env.VITE_SERVER_API;
const apartmentsApi = `${serverApi}/apartments`;
@@ -13,6 +13,7 @@ interface MobileApartmentDescriptionProps {
apartments: IAparmentRes[];
apartmentDataType: string | null;
floor: IDesctiptionFloor | null;
isLeft: boolean;
}
const MobileApartmentDescription = ({
@@ -20,6 +21,7 @@ const MobileApartmentDescription = ({
apartmentDataType,
apartments,
floor,
isLeft,
}: MobileApartmentDescriptionProps) => {
const wing =
apartment && apartment.Unit_No.split("-")[0] === "E"
@@ -91,7 +93,11 @@ const MobileApartmentDescription = ({
</div>
)}
</div>
<div className="w-0 h-0 border-transparent border-t-[33px] border-x-[14px] border-b-0 absolute left-[57.6px] -bottom-[32px] border-t-white"></div>
<div
className={`w-0 h-0 border-transparent border-t-[33px] border-x-[14px] border-b-0 absolute ${
!isLeft ? "left-[57.6px]" : "right-[57.6px]"
} -bottom-[32px] border-t-white`}
></div>
<div className="w-full pb-6 ">
<Button
buttonType="cta"
@@ -199,6 +199,7 @@ const SequenceWing = () => {
);
setIsDescriptionFloorMobile(false);
};
const handleOnExploreSkygardenClick = (
e: MouseEvent<Element, MouseEvent<Element, MouseEvent>> | any
) => {
@@ -60,6 +60,7 @@ const WingFloorModal = ({
const [currentApartmentType, setCurrentApartmentType] = useState<
string | null
>(null);
const [isLeft, setIsLeft] = useState(false);
const [currentApartment, setCurrentApartment] = useState<IAparmentRes | null>(
null
);
@@ -112,9 +113,10 @@ const WingFloorModal = ({
} else {
const scrollOffsetY = window.scrollY;
//detect mouse pos
const _isLeft = event.clientX > 1390;
setIsLeft(_isLeft);
const x = _isLeft ? event.clientX - 800 : event.clientX - 140;
const y = event.clientY - 65 + scrollOffsetY - 650;
const x = event.clientX - 140;
// const x = event.clientX - 50;
setMousePos([x, y]);
}
}
@@ -198,6 +200,7 @@ const WingFloorModal = ({
style={{ top: `${mousePos[1]}px`, left: `${mousePos[0]}px` }}
>
<MobileApartmentDescription
isLeft={isLeft}
apartment={currentApartment}
apartmentDataType={currentApartmentType}
apartments={apartments}
+4 -2
View File
@@ -1,2 +1,4 @@
PORT=4003
REFRESH_TOKEN=1000.da3146d49fa8a399f0c635e74954ff9c.e010dbb1bb605d7e1aa5bf7fc0521f8b
PORT=4002
REFRESH_TOKEN=1000.fc5277c1aad3fedb0b11d40835eef9ae.430020841f8e0dc73267dceabfe39606
CLIENT_SECRET=79910650c3b2d3ca2b9c4593880ad5f56d7b0ec818
CLIENT_ID=1000.9XUAOPRWN2U880F8WNA8IM9IS2T6IK
+5 -3
View File
@@ -1,7 +1,9 @@
const refreshToken =
"1000.da3146d49fa8a399f0c635e74954ff9c.e010dbb1bb605d7e1aa5bf7fc0521f8b";
const clientId = "1000.6ZV07WFOC7PQOY3X109UN55Q9BMBBY";
const clientSecret = "595f5262886a6e81475b533350a81e46fecda57fb5";
process.env.REFRESH_TOKEN ||
"1000.fc5277c1aad3fedb0b11d40835eef9ae.430020841f8e0dc73267dceabfe39606";
const clientId = process.env.CLIENT_ID || "1000.9XUAOPRWN2U880F8WNA8IM9IS2T6IK";
const clientSecret =
process.env.CLIENT_SECRET || "79910650c3b2d3ca2b9c4593880ad5f56d7b0ec818";
const grantType = "refresh_token";
const updateAccessTokenApi = `https://accounts.zoho.com/oauth/v2/token?refresh_token=${refreshToken}&client_id=${clientId}&client_secret=${clientSecret}&grant_type=${grantType}`;