diff --git a/frontend/public/index.html b/frontend/public/index.html index 95521a85e..b03502168 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -62,16 +62,18 @@ alert('잘못 된 api key 입니다.'); } - if ('serviceWorker' in navigator) { - navigator.serviceWorker - .register('pwabuilder-sw.js') - .then(function (registration) { - registration.scope; - }) - .catch(function (error) { - console.log('Service Worker registration failed', error); - }); - } + (function () { + if ('serviceWorker' in navigator) { + navigator.serviceWorker + .register('pwabuilder-sw.js') + .then(function (registration) { + registration.scope; + }) + .catch(function (error) { + console.log('Service Worker registration failed', error); + }); + } + })(); diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index b57680281..70e3ade94 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -3,12 +3,14 @@ import Loading from 'components/ui/Loading'; import CarFfeineMap from '@map/CarFfeineMap'; +import NotFound from '@ui/NotFound'; + const render = (status: Status) => { switch (status) { case Status.LOADING: return ; case Status.FAILURE: - return <>에러 발생; + return ; case Status.SUCCESS: return ; } diff --git a/frontend/src/components/ui/Navigator/NavigationBar/Menu.tsx b/frontend/src/components/ui/Navigator/NavigationBar/Menu.tsx index 6b94e0f7d..a7164c63e 100644 --- a/frontend/src/components/ui/Navigator/NavigationBar/Menu.tsx +++ b/frontend/src/components/ui/Navigator/NavigationBar/Menu.tsx @@ -1,7 +1,7 @@ import { AdjustmentsHorizontalIcon, Bars3Icon, UserCircleIcon } from '@heroicons/react/24/outline'; import { css } from 'styled-components'; -import { HiArrowPath, HiOutlineChatBubbleOvalLeftEllipsis } from 'react-icons/hi2'; +import { HiOutlineArrowDownTray, HiOutlineChatBubbleOvalLeftEllipsis } from 'react-icons/hi2'; import { useExternalValue } from '@utils/external-state'; @@ -16,6 +16,7 @@ import PersonalMenu from '@ui/Navigator/NavigationBar/PersonalMenu'; import ServerStationFilters from '@ui/ServerStationFilters'; import StationListWindow from '@ui/StationListWindow'; import StationSearchWindow from '@ui/StationSearchWindow'; +import HowToAppInstallModal from '@ui/modal/HowToAppInstallModal'; import LoginModal from '@ui/modal/LoginModal/LoginModal'; import { displayNoneInMobile, displayNoneInWeb } from '@style/mediaQuery'; @@ -38,6 +39,10 @@ const Menu = () => { modalActions.openModal(); }; + const handleOpenHowToAppInstallModal = () => { + modalActions.openModal(); + }; + return ( @@ -122,6 +127,18 @@ const Menu = () => { 피드백 + + ); }; diff --git a/frontend/src/components/ui/modal/HowToAppInstallModal.tsx b/frontend/src/components/ui/modal/HowToAppInstallModal.tsx new file mode 100644 index 000000000..3b9115df3 --- /dev/null +++ b/frontend/src/components/ui/modal/HowToAppInstallModal.tsx @@ -0,0 +1,75 @@ +import { XMarkIcon } from '@heroicons/react/24/outline'; +import { FlexBox } from 'car-ffeine-design-system'; + +import { BsArrowDownSquare, BsPlusSquare } from 'react-icons/bs'; +import { FiMoreVertical } from 'react-icons/fi'; +import { IoShareOutline } from 'react-icons/io5'; +import { MdInstallDesktop, MdInstallMobile } from 'react-icons/md'; + +import { modalActions } from '@stores/layout/modalStore'; + +import useMediaQueries from '@hooks/useMediaQueries'; + +import Button from '@common/Button'; +import Text from '@common/Text'; + +const HowToAppInstallModal = () => { + const screen = useMediaQueries(); + + return ( + + + {screen.get('isMobile') ? ( + <> + ) : ( + + + 크롬 브라우저인가요? + + + 주소창 오른쪽에 위치한 + 아이콘을 누르세요. + + 아쉽게도 사파리는 지원하지 않습니다 + + )} +
+ + IOS 모바일인가요? + + + 주소창 근처에 있는 + 아이콘을 누르세요. + + + 그리고 홈 화면에 추가 를 눌러주세요. + +
+
+ + 안드로이드인가요? + + + 주소창 오른쪽에 위치한 + 아이콘을 누르거나 + + + 아이콘을 누른 뒤, 앱 설치 버튼 + 을 누르세요. + +
+
+ ); +}; + +export default HowToAppInstallModal;