diff --git a/src/ui/App.tsx b/src/ui/App.tsx index c300aab..9d6f083 100644 --- a/src/ui/App.tsx +++ b/src/ui/App.tsx @@ -17,6 +17,8 @@ import { useAreaStore } from "@/state/areaStore"; import { useActionStore } from "@/state/exportStore"; import { Modal } from "@/components/modal/Modal"; import { TopNav } from "@/components/nav/TopNav"; +import { getCookie } from "@/utils/cookie"; +import { Row } from "@/components/flex/Row"; const IconSize = css({ width: "14px", @@ -29,6 +31,8 @@ function App() { const [steps, setSteps] = useState(["front", "processing"]); const [step, setStep] = useState(0); const [isWarnModal, setIsWarnModal] = useState(false); + const [isExportModal, setIsExportModal] = useState(false); + const [isFleetLogin, setIsFleetLogin] = useState(false); const setCenter = useAreaStore((state) => state.setCenter); const setAction = useActionStore((state) => state.setAction); @@ -46,6 +50,23 @@ function App() { } }; + const exportFile = () => { + setAction(true); + }; + + const exportFleet = () => { + setAction(true); + }; + + const checkFleetLogin = () => { + try { + const isCookie = getCookie("token"); + if (isCookie) { + setIsFleetLogin(true); + } + } catch (error) {} + }; + const handleDone = (data) => { setAreaData(data); setCenter(data); @@ -71,9 +92,13 @@ function App() { }; const handleClickExport = () => { - setAction(true); + setIsExportModal(true); }; + useState(() => { + checkFleetLogin(); + }, []); + return (