Skip to content

Commit

Permalink
fix: useEffect로 감싸주기 (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
lydiacho authored Jul 31, 2024
1 parent 7ac42ea commit 6327654
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ const router = createBrowserRouter([
]);

const App = () => {
const isMobile = /Mobi/i.test(window.navigator.userAgent);
if (isMobile) {
alert('PC로 지원해주세요.');
window.location.href = 'https://makers.sopt.org/recruit';
}
useEffect(() => {
const isMobile = /Mobi/i.test(window.navigator.userAgent);
if (isMobile) {
alert('PC로 지원해주세요.');
window.location.href = 'https://makers.sopt.org/recruit';
}
}, []);

const sessionRef = useRef<HTMLDialogElement>(null);

Expand Down

0 comments on commit 6327654

Please sign in to comment.