@@ -329,7 +429,10 @@ export default function KYLHomePage() {
{/* Track Section */}
-
+
{/* Narrow text container */}
@@ -392,46 +495,68 @@ export default function KYLHomePage() {
icon: "☀️",
},
].map((item, index) => (
-
- {
- if (item.link) {
- handleNavigate(item.link, item.title);
- }
- }}
- className="cursor-pointer bg-white rounded-2xl shadow-md p-6 sm:p-8 h-full min-h-[220px] flex flex-col justify-start transform transition-all duration-300 hover:shadow-xl hover:-translate-y-1 hover:scale-[1.02]"
- >
+ {
+ if (item.link) {
+ handleNavigate(item.link, item.title);
+ }
+ }}
+ className={`w-full h-full text-left rounded-2xl border transition-all duration-300 transform focus:outline-none focus-visible:ring-2 focus-visible:ring-purple-500 ${
+ item.link
+ ? "bg-white border-gray-100 shadow-md hover:shadow-xl hover:-translate-y-1 hover:scale-[1.02]"
+ : "bg-gray-50 border-dashed border-gray-300 text-gray-400 cursor-default"
+ }`}
+ >
+
-
+
{item.icon}
-
-
+
+
{item.title}
-
+
{item.description}
{item.link ? (
-
+
Learn More →
) : (
-
- Coming soon...
+
+ Coming soon
)}
-
+
))}
-
-
-
+
+
+
);
}
diff --git a/src/pages/LandscapeExplorer.jsx b/src/pages/LandscapeExplorer.jsx
index 52cda349..dfbdfeff 100644
--- a/src/pages/LandscapeExplorer.jsx
+++ b/src/pages/LandscapeExplorer.jsx
@@ -19,6 +19,8 @@ import {
initializeAnalytics,
} from "../services/analytics";
import LandingNavbar from "../components/landing_navbar.jsx";
+import LoadingSpinner from "../components/ui/LoadingSpinner.jsx";
+import toast from "react-hot-toast";
const LandscapeExplorer = () => {
const [showLeftSidebar, setShowLeftSidebar] = useState(false);
@@ -201,7 +203,7 @@ const LandscapeExplorer = () => {
// Handle GeoJSON download
const handleGeoJsonLayers = (layerName) => {
if (!district || !block) {
- alert("Please select a district and block first");
+ toast.error("Please select a district and block first.");
return;
}
@@ -246,7 +248,7 @@ const LandscapeExplorer = () => {
// Handle KML download
const handleKMLLayers = (layerName) => {
if (!district || !block) {
- alert("Please select a district and block first");
+ toast.error("Please select a district and block first.");
return;
}
@@ -291,7 +293,7 @@ const LandscapeExplorer = () => {
// Handle Excel download
const handleExcelDownload = () => {
if (!district || !block) {
- alert("Please select a district and block first");
+ toast.error("Please select a district and block first.");
return;
}
@@ -321,11 +323,12 @@ const LandscapeExplorer = () => {
link.remove();
URL.revokeObjectURL(url);
setIsLoading(false);
+ toast.success("Excel data downloaded successfully.");
})
.catch((error) => {
console.error("Error downloading Excel:", error);
setIsLoading(false);
- alert("Failed to download Excel data. Please try again.");
+ toast.error("Failed to download Excel data. Please try again.");
});
};
@@ -379,6 +382,16 @@ const LandscapeExplorer = () => {
)}
+ {isLoading && (
+
+
+
+
+ Preparing data layers…
+
+
+
+ )}
{!showLeftSidebar && (
setShowLeftSidebar(true)}
diff --git a/src/pages/RWBDashboard.jsx b/src/pages/RWBDashboard.jsx
index c7fc115c..39b7d356 100644
--- a/src/pages/RWBDashboard.jsx
+++ b/src/pages/RWBDashboard.jsx
@@ -92,11 +92,11 @@ const RWBDashboard =()=>{
}, [location.search]);
const handleNavigate =()=>{
- if(!organization && !project) return;
+ if (!project?.value) return;
const params = new URLSearchParams(location.search);
params.set("type", "project");
params.set("projectId", project.value);
- params.set("project_name", project.label);
+ params.set("project_name", project.label ?? "");
navigate(
{
pathname:location.pathname,
@@ -178,8 +178,10 @@ const RWBDashboard =()=>{
handleItemSelect={(setState, e) => setState(e)}
/>
-
+
Show Waterbodies
+
+
{item.title}
-
+
{item.description}
{item.link ? (
-
+
Learn More →
) : (
-
- Coming soon...
+
+ Coming soon
)}
{item.title}
-+
{item.description}
{item.link ? ( - + Learn More → ) : ( - - Coming soon... + + Coming soon )}+ Preparing data layers… +
+