This repository was archived by the owner on Jan 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ const RepoItem = ({
66
66
const { openFolderInExplorer, os, openLink } = useContext ( DeviceContext ) ;
67
67
68
68
const onRepoSync = useCallback (
69
- async ( e ?: MouseEvent | KeyboardEvent ) => {
69
+ async ( e ?: MouseEvent | KeyboardEvent | React . MouseEvent ) => {
70
70
e ?. preventDefault ( ) ;
71
71
e ?. stopPropagation ( ) ;
72
72
await syncRepo ( repo . ref ) ;
Original file line number Diff line number Diff line change 1
- import {
1
+ import React , {
2
2
memo ,
3
3
useCallback ,
4
4
useContext ,
@@ -131,15 +131,18 @@ const TutorialCards = ({}: Props) => {
131
131
return tabItems . find ( ( i ) => i . key === 'explain_file' ) ?. onClick ;
132
132
} , [ tabItems ] ) ;
133
133
134
- const onBtnClick = useCallback ( ( ) => {
135
- if ( btnTitle === 'New conversation' ) {
136
- openNewTab ( { type : TabTypesEnum . CHAT } ) ;
137
- handleNext ( ) ;
138
- } else if ( btnTitle === 'Explain current file' && explainCurrentFile ) {
139
- explainCurrentFile ( ) ;
140
- handleNext ( ) ;
141
- }
142
- } , [ btnTitle , handleNext , explainCurrentFile ] ) ;
134
+ const onBtnClick = useCallback (
135
+ ( e : React . MouseEvent ) => {
136
+ if ( btnTitle === 'New conversation' ) {
137
+ openNewTab ( { type : TabTypesEnum . CHAT } ) ;
138
+ handleNext ( ) ;
139
+ } else if ( btnTitle === 'Explain current file' && explainCurrentFile ) {
140
+ explainCurrentFile ( e ) ;
141
+ handleNext ( ) ;
142
+ }
143
+ } ,
144
+ [ btnTitle , handleNext , explainCurrentFile ] ,
145
+ ) ;
143
146
144
147
return (
145
148
< div className = "absolute right-0 bottom-0 px-8 py-8 w-full max-w-[26rem] select-none" >
You can’t perform that action at this time.
0 commit comments