-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into combined-prs
- Loading branch information
Showing
35 changed files
with
420 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { useEffect } from 'react'; | ||
|
||
export const useClickAway = (ref, onClose: () => void) => { | ||
useEffect(() => { | ||
function handleClickOutside(event) { | ||
if (ref.current && !ref.current.contains(event.target)) { | ||
onClose(); | ||
} | ||
} | ||
// Bind the event listener | ||
document.addEventListener('mousedown', handleClickOutside); | ||
return () => { | ||
// Unbind the event listener on clean up | ||
document.removeEventListener('mousedown', handleClickOutside); | ||
}; | ||
}, [ref, onClose]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
import 'json-bigint-patch'; | ||
import React from 'react'; | ||
import { render } from 'react-dom'; | ||
import ReactDom from 'react-dom/client'; | ||
import App from './App'; | ||
|
||
const logger = require('electron-log'); | ||
|
||
logger.transports.console.level = false; | ||
|
||
render(<App />, document.getElementById('root')); | ||
const root = ReactDom.createRoot( | ||
document.getElementById('root') as HTMLElement | ||
); | ||
|
||
root.render(<App />); |
Oops, something went wrong.