-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 카카오 인앱프라우저로 접속시 다른 브라우저로 열기 안내 토스트 구현 (#120)
방만들기와, 초대하기에서 토스트
- Loading branch information
1 parent
f94e834
commit 0a37e5a
Showing
4 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { useEffect } from 'react'; | ||
import { Toaster } from 'react-hot-toast'; | ||
|
||
import { notifyUseToast } from '../components/toast/NotifyToast'; | ||
|
||
interface propsType { | ||
children: React.ReactNode; | ||
} | ||
|
||
export default function CheckInAppBrowser({ children }: propsType) { | ||
useEffect(() => { | ||
if (navigator.userAgent.indexOf('KAKAOTALK') >= 0) { | ||
notifyUseToast( | ||
'카카오톡안에서 튕기면 재접속할 수 없습니다.\n\n⋮ 을 눌러 다른 브라우저로 열어주세요.', | ||
'WARNING', | ||
); | ||
} | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<Toaster /> | ||
{children} | ||
</> | ||
); | ||
} |