File tree 1 file changed +3
-18
lines changed
1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const TimetableSharingActivity: ActivityComponentType<TimetableSharingParams> =
17
17
} ) => {
18
18
const templateRef = useRef < HTMLDivElement > ( null ) ;
19
19
const [ openToast , setOpenToast ] = useState ( false ) ;
20
- const [ toastMessage , setToastMessage ] = useState ( {
20
+ const [ toastMessage ] = useState ( {
21
21
title : '' ,
22
22
description : '' ,
23
23
} ) ;
@@ -72,23 +72,8 @@ const TimetableSharingActivity: ActivityComponentType<TimetableSharingParams> =
72
72
73
73
await navigator . share ( shareData ) ;
74
74
}
75
- } catch {
76
- navigator . clipboard
77
- . writeText ( window . location . href )
78
- . then ( ( ) => {
79
- setToastMessage ( {
80
- title : '링크가 복사되었어요!' ,
81
- description : '현재 페이지의 URL이 클립보드에 복사되었어요.' ,
82
- } ) ;
83
- setOpenToast ( true ) ;
84
- } )
85
- . catch ( ( ) => {
86
- setToastMessage ( {
87
- title : '공유하기를 지원하지 않는 환경입니다' ,
88
- description : '다른 브라우저에서 시도해보세요.' ,
89
- } ) ;
90
- setOpenToast ( true ) ;
91
- } ) ;
75
+ } catch ( error ) {
76
+ console . error ( 'Failed to share template:' , error ) ;
92
77
}
93
78
} ;
94
79
You can’t perform that action at this time.
0 commit comments