Skip to content

Commit f99a9c3

Browse files
authored
close menu when connecting (#120)
1 parent 500f6d1 commit f99a9c3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/renderer/components/ConnectionRow.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ const ConnectionRow: React.FC<ConnectionRowProps> = ({
9797
};
9898

9999
const copyAddress = () => {
100+
setMenuAnchor(null);
100101
clipboard.writeText(port);
101102
enqueueSnackbar('Address Copied', {
102103
variant: 'success',
@@ -105,6 +106,7 @@ const ConnectionRow: React.FC<ConnectionRowProps> = ({
105106
};
106107

107108
const toggleConnected = () => {
109+
setMenuAnchor(null);
108110
ipcRenderer.send(UPDATE_LISTENERS, {
109111
connectionIds: [connection?.id || ''],
110112
connected: !connected,

src/shared/constants.ts

-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ export const prodDebug = process.env.DEBUG_PROD === 'true';
77
export const TOAST_LENGTH = 2000;
88

99
// Actions for the ipcMain and ipcRenderer messages
10-
export const CONNECTION_RESPONSE = 'connection-resp';
11-
export const CONNECTION_CLOSED = 'connection-close';
1210
export const DISCONNECT_ALL = 'disconnect-all';
1311
export const DISCONNECT = 'disconnect';
1412
export const UPDATE_LISTENERS = 'update_listeners';
@@ -27,7 +25,6 @@ export const DELETE = 'delete';
2725
export const DELETE_ALL = 'delete-all';
2826
export const DUPLICATE = 'duplicate';
2927
export const EXPORT = 'export';
30-
export const EXPORT_ALL = 'export-all';
3128
export const IMPORT = 'import';
3229
export interface QueryParams {
3330
connectionID: string;

0 commit comments

Comments
 (0)