File tree Expand file tree Collapse file tree 12 files changed +26
-17
lines changed Expand file tree Collapse file tree 12 files changed +26
-17
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,13 @@ const App = () => {
81
81
} ) ;
82
82
} ;
83
83
84
+ /**
85
+ * Close the alert dialog
86
+ */
87
+ const closeAlertDialog = ( ) => {
88
+ d1 ( setError ( null ) ) ;
89
+ } ;
90
+
84
91
useEffect ( ( ) => {
85
92
// eslint-disable-next-line no-underscore-dangle
86
93
if ( autoUpdate && window . __TAURI__ ) {
@@ -116,8 +123,8 @@ const App = () => {
116
123
title = { language . error }
117
124
content = { error }
118
125
agreeLabel = { language . ok }
119
- onOk = { ( ) => d1 ( setError ( null ) ) }
120
- onClose = { ( ) => d1 ( setError ( null ) ) }
126
+ onOk = { closeAlertDialog }
127
+ onClose = { closeAlertDialog }
121
128
/>
122
129
) : null }
123
130
{ update && update . updateAvailable ? (
Original file line number Diff line number Diff line change 1
- import * as React from 'react' ;
1
+ import React , { useContext } from 'react' ;
2
2
import Box from '@mui/material/Box' ;
3
3
import Drawer from '@mui/material/Drawer' ;
4
4
import Toolbar from '@mui/material/Toolbar' ;
@@ -15,7 +15,6 @@ import LightbulbIcon from '@mui/icons-material/Lightbulb';
15
15
import InfoIcon from '@mui/icons-material/Info' ;
16
16
import SettingsIcon from '@mui/icons-material/Settings' ;
17
17
import AttachMoneyIcon from '@mui/icons-material/AttachMoney' ;
18
- import { useContext } from 'react' ;
19
18
import { useNavigate } from 'react-router-dom' ;
20
19
import { MainContext } from '../../contexts/MainContextProvider' ;
21
20
import { openWebSite } from '../../reducers/MainReducer/Actions' ;
Original file line number Diff line number Diff line change 1
- import * as React from 'react' ;
1
+ import React from 'react' ;
2
2
import clsx from 'clsx' ;
3
3
import TableCell from '@mui/material/TableCell' ;
4
4
import { AutoSizer , Column , Table } from 'react-virtualized' ;
Original file line number Diff line number Diff line change 1
- import * as React from 'react' ;
1
+ import React , { useContext } from 'react' ;
2
2
import AppBar from '@mui/material/AppBar' ;
3
3
import Toolbar from '@mui/material/Toolbar' ;
4
4
import Typography from '@mui/material/Typography' ;
5
- import { useContext } from 'react' ;
6
5
import IconButton from '@mui/material/IconButton' ;
7
6
import Brightness5Icon from '@mui/icons-material/Brightness5' ;
8
7
import Brightness7Icon from '@mui/icons-material/Brightness7' ;
Original file line number Diff line number Diff line change 76
76
"plainText" : " Plain text" ,
77
77
"notFound" : " There's really nothing here except for some top secret stuff (maybe)." ,
78
78
"notFoundGoHome" : " Would you like to go back to the home page?" ,
79
- "home" : " Home"
79
+ "home" : " Home" ,
80
+ "ok" : " OK"
80
81
}
Original file line number Diff line number Diff line change 76
76
"plainText" : " Texte brut" ,
77
77
"notFound" : " Il n'y a rien ici" ,
78
78
"notFoundGoHome" : " Retour à l'accueil ?" ,
79
- "home" : " Accueil"
79
+ "home" : " Accueil" ,
80
+ "ok" : " OK"
80
81
}
Original file line number Diff line number Diff line change 76
76
"plainText" : " Tekst" ,
77
77
"notFound" : " Er is hier niets te zien." ,
78
78
"notFoundGoHome" : " Naar de startpagina gaan?" ,
79
- "home" : " Startpagina"
79
+ "home" : " Startpagina" ,
80
+ "ok" : " Oké"
80
81
}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import packageJson from '../../../package.json';
10
10
11
11
const About = ( ) => {
12
12
const [ state , d1 ] = useContext ( MainContext ) ;
13
+
13
14
const { languageIndex } = state ;
14
15
const language = state . languages [ languageIndex ] ;
15
16
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { setPageIndex } from '../../reducers/MainReducer/Actions';
12
12
13
13
const Advisor = ( ) => {
14
14
const [ state , d1 ] = useContext ( MainContext ) ;
15
+
15
16
const { languageIndex } = state ;
16
17
const language = state . languages [ languageIndex ] ;
17
18
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import Container from '@mui/material/Container';
3
3
import Button from '@mui/material/Button' ;
4
4
import { createWorkerFactory , useWorker } from '@shopify/react-web-worker' ;
5
5
import { styled } from '@mui/material/styles' ;
6
- import { Paper } from '@mui/material' ;
6
+ import Paper from '@mui/material/Paper ' ;
7
7
import { save } from '@tauri-apps/api/dialog' ;
8
8
import { invoke } from '@tauri-apps/api/tauri' ;
9
9
import { MainContext } from '../../contexts/MainContextProvider' ;
You can’t perform that action at this time.
0 commit comments