Skip to content

Commit

Permalink
feat: browser 판단 로직 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
eonseok-jeon committed Sep 21, 2024
1 parent 1ddf1eb commit 2b625cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script src="//t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"></script>
<script type="module" src="./src/views/UnsupportedPage/utils/checkBrowser.ts"></script>
</body>
</html>
5 changes: 5 additions & 0 deletions src/views/UnsupportedPage/utils/checkBrowser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import supportedBrowsers from '../supportedBrowsers';

if (!supportedBrowsers.test(navigator.userAgent)) {
if (window.location.pathname !== '/unsupported') window.location.href = '/unsupported';
}

0 comments on commit 2b625cf

Please sign in to comment.