import { Outlet } from "react-router-dom";
import { isMobile } from "react-device-detect";
import useModal from "../../../store/useModal";
import DesktopHeader from "./DesktopHeader";
import MobileHeader from "./MobileHeader";

const Header = () => {
  const { modal } = useModal();
  return (
    <>
      {modal}
      {isMobile ? <MobileHeader /> : <DesktopHeader />}
      <Outlet />
    </>
  );
};

export default Header;
