From 0341d28d2f4e0ad7429fa465d4613ceb2b7c0274 Mon Sep 17 00:00:00 2001 From: inmake Date: Fri, 23 May 2025 19:40:05 +0500 Subject: [PATCH] upd --- .env | 3 +- src/components/Header.tsx | 143 +++++++++++++++++++++------ src/components/SearchFilters.tsx | 67 +++---------- src/pages/SearchPage.tsx | 161 +++++++++++++++++++++---------- 4 files changed, 242 insertions(+), 132 deletions(-) diff --git a/.env b/.env index e9d4e84..0b988dc 100644 --- a/.env +++ b/.env @@ -1 +1,2 @@ -VITE_API_URL=http://194.26.138.94:4002 \ No newline at end of file +VITE_API_URL=http://localhost:4002 +# VITE_API_URL=http://194.26.138.94:4002 \ No newline at end of file diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 7c7bf0b..0b3c2e6 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -145,25 +145,59 @@ function Header() {

Rove Home Marasi Drive

- {[ - "Rove Main Brochure", - "Rove Amenties Brochure", - "Rove Technical Brochure", - ].map((title) => ( - - ))} + + + + +

Rove Home Downtown

- {[ - "Rove Main Brochure", - "Rove Amenties Brochure", - "Rove Technical Brochure", - ].map((title) => ( - - ))} + + + + + + +
@@ -268,25 +302,59 @@ function BrochuresDropdown() {

Rove Home Marasi Drive

- {[ - "Rove Main Brochure", - "Rove Amenties Brochure", - "Rove Technical Brochure", - ].map((title) => ( - - ))} + + + + +

Rove Home Downtown

- {[ - "Rove Main Brochure", - "Rove Amenties Brochure", - "Rove Technical Brochure", - ].map((title) => ( - - ))} + + + + + + +
@@ -296,12 +364,29 @@ function BrochuresDropdown() { ); } -export function BrochureButton({ title }: { title: string }) { +export function BrochureButton({ + title, + link, +}: { + title: string; + link: string; +}) { + const handleDownload = () => { + const anchor = document.createElement("a"); + anchor.href = link; + anchor.download = title; // Use the title as the filename + anchor.style.display = "none"; + document.body.appendChild(anchor); + anchor.click(); + document.body.removeChild(anchor); + }; + return (