File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,25 @@ const REST_API_KEY = import.meta.env.VITE_OAUTH_KAKAO_REST_API_KEY
66const REDIRECT_URI = import . meta. env . VITE_OAUTH_KAKAO_REDIRECT_URI
77const LOGIN_LINK = `https://kauth.kakao.com/oauth/authorize?client_id=${ REST_API_KEY } &redirect_uri=${ REDIRECT_URI } &response_type=code`
88
9+ const SHARE_DATA = {
10+ title : "자세공작소와 함께하는 일상의 변화" ,
11+ url : window . location . origin ,
12+ }
13+
914const HomePage : React . FC = ( ) => {
1015 const loginHandler = ( ) : void => {
1116 window . location . href = LOGIN_LINK
1217 }
1318
19+ const shareLinkHandler = async ( ) : Promise < void > => {
20+ try {
21+ await navigator . share ( SHARE_DATA )
22+ console . log ( "공유 성공" )
23+ } catch ( e ) {
24+ console . log ( "공유 실패" )
25+ }
26+ }
27+
1428 useEffect ( ( ) => {
1529 logAnalytics ( "view_login" )
1630 } , [ ] )
@@ -33,6 +47,12 @@ const HomePage: React.FC = () => {
3347 >
3448 카카오톡으로 계속하기
3549 </ div >
50+ < div
51+ className = "flex w-fit cursor-pointer rounded-full bg-zinc-900 px-7 py-2 leading-[34px] text-white"
52+ onClick = { shareLinkHandler }
53+ >
54+ 링크 공유
55+ </ div >
3656 </ div >
3757 < div className = "absolute bottom-0 left-10 h-[292px] w-[528px]" >
3858 < img src = { IntroImage } alt = "Intro" />
You can’t perform that action at this time.
0 commit comments