diff --git a/dashboard/src/layouts/components/Footer.jsx b/dashboard/src/layouts/components/Footer.jsx index 8f79f23..12b571d 100644 --- a/dashboard/src/layouts/components/Footer.jsx +++ b/dashboard/src/layouts/components/Footer.jsx @@ -4,6 +4,7 @@ import { NavLink, useNavigate } from "react-router-dom"; import Container from "@/components/Shared/Container"; import getNavLinks from "@/navLinks"; import { useCartStore } from "@/stores/useCartStore"; +import { isHotelAppInstalled } from "@/lib/utils"; const Footer = () => { const [navLinks, setNavLinks] = useState([]); @@ -26,33 +27,72 @@ const Footer = () => { } }; + const handleHotelClick = async (e) => { + e.preventDefault(); + try { + const installed = await isHotelAppInstalled(); + if (installed) { + window.location.href = "/app/hotel-dashboard"; + } else { + alert("Havano Hotel Management app is not installed."); + } + } catch (error) { + console.error("Error checking hotel app:", error); + alert("Unable to open Hotel Dashboard. Please contact your administrator."); + } + }; + return (
{errorWaiters}
- )}