File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ Toolbar.ContextMenu = function ToolbarContextMenu({
137137 < span > { text } </ span >
138138 </ li >
139139 ) ;
140- } , [ ] ) ;
140+ } , [ text ] ) ;
141141
142142 return < AttachedContextMenu items = { items } activator = { activator } /> ;
143143} ;
Original file line number Diff line number Diff line change 77 useContext ,
88 useState ,
99} from 'react' ;
10- import { db } from 'renderer/db' ;
1110
1211const DatabaseSettingContext = createContext < {
1312 setting ?: ConnectionStoreItem ;
@@ -27,15 +26,14 @@ export function DatabaseSettingProvider({
2726 setting,
2827} : PropsWithChildren < { setting : ConnectionStoreItem } > ) {
2928 const [ protectionLevel , setProductionLevel ] = useState (
30- setting . protectionLevel === undefined ? 1 : setting . protectionLevel
29+ setting . protectionLevel === undefined ? 1 : setting . protectionLevel ,
3130 ) ;
3231
3332 const setProductionLevelCallback = useCallback (
3433 ( level : number ) => {
3534 setProductionLevel ( level ) ;
36- db . table ( 'database_config' ) . put ( { ...setting , protectionLevel : level } ) ;
3735 } ,
38- [ setProductionLevel ]
36+ [ setProductionLevel ] ,
3937 ) ;
4038
4139 return (
You can’t perform that action at this time.
0 commit comments