NamH 6af4a2d484
feat: add deeplink support (#2883)
* feat: add deeplink support

* fix windows not receive deeplink when not running

---------

Co-authored-by: James <james@jan.ai>
2024-05-13 09:37:05 +07:00

14 lines
568 B
TypeScript

export const setupReactDevTool = async () => {
// Which means you're running from source code
const { default: installExtension, REACT_DEVELOPER_TOOLS } = await import(
'electron-devtools-installer'
) // Don't use import on top level, since the installer package is dev-only
try {
const name = await installExtension(REACT_DEVELOPER_TOOLS)
console.debug(`Added Extension: ${name}`)
} catch (err) {
console.error('An error occurred while installing devtools:', err)
// Only log the error and don't throw it because it's not critical
}
}