Skip to content

Commit

Permalink
fix: duplicate alert
Browse files Browse the repository at this point in the history
  • Loading branch information
hrenaud committed Oct 4, 2024
1 parent d00ed51 commit 27b64b1
Showing 1 changed file with 27 additions and 16 deletions.
43 changes: 27 additions & 16 deletions src/renderer/MainWindow/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,14 @@ function TheApp() {
window.initialisationAPI.sendConfigDatasToFront(
(configData: ConfigData) => {
frontLog.debug(`sendConfigDatasToFront`, configData)
if (configData.error) {
frontLog.error(configData)
window.alert(
`${configData.type} : ${configData.message ? configData.message : configData.error}`
)
}
// if (configData.error) {
// frontLog.error(configData)
// if (process.env['WEBPACK_SERVE'] === 'true') {
// window.alert(
// `0. ${configData.type} : ${configData.message ? configData.message : configData.error}`
// )
// }
// }
switch (configData.type) {
case ConfigData.WORKDIR:
setWorkDir(configData.result as string)
Expand Down Expand Up @@ -521,20 +523,29 @@ function TheApp() {
break

default:
alert(
`ConfigData.errorType=${configData.errorType} not handle in App.tsx`
)
// throw new Error(
// 'ConfigData.errorType not handle in App.tsx'
// )
// if (configData.errorType !== undefined) {
// window.alert(
// `1. ConfigData.errorType=${configData.errorType} not handle in App.tsx`
// )
// } else {
// frontLog.error(
// `ConfigData.errorType=${configData.errorType} not handle in App.tsx`
// )
// }
break
}
break

default:
alert(
`ConfigData.type=${configData.type} not handle in App.tsx`
)
// throw new Error('ConfigData not handle in App.tsx')
// if (configData.type) {
// window.alert(
// `2. ConfigData.type=${configData.type} not handle in App.tsx`
// )
// } else {
// frontLog.error(
// `ConfigData.type=${configData.type} not handle in App.tsx`
// )
// }
}
}
)
Expand Down

0 comments on commit 27b64b1

Please sign in to comment.