File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ const App = () => {
4848 } = state ;
4949
5050 const [ drawerOpen , setDrawerOpen ] = useState ( false ) ;
51- const [ snackOpen , setSnackOpen ] = useState ( false ) ;
51+ const [ snackOpen , setSnackOpen ] = useState ( ! window . __TAURI__ ) ;
5252 const language = state . languages [ languageIndex ] ;
5353
5454 const color = ThemeSelector ( themeIndex ) ;
@@ -112,8 +112,6 @@ const App = () => {
112112 if ( autoUpdate ) {
113113 checkForUpdates ( ) ;
114114 }
115- } else {
116- setSnackOpen ( true ) ;
117115 }
118116 // eslint-disable-next-line react-hooks/exhaustive-deps
119117 } , [ ] ) ;
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const PasswordTips = () => {
1616 const intervalId = useRef ( ) ;
1717 const [ currentTip , setCurrentTip ] = useState (
1818 language . passwordTips [
19+ // eslint-disable-next-line react-hooks/purity
1920 Math . floor ( Math . random ( ) * language . passwordTips . length )
2021 ] ,
2122 ) ;
@@ -49,6 +50,7 @@ const PasswordTips = () => {
4950
5051 useEffect ( ( ) => {
5152 if ( tips ) {
53+ // eslint-disable-next-line react-hooks/set-state-in-effect
5254 setCurrentTip (
5355 language . passwordTips [
5456 Math . floor ( Math . random ( ) * language . passwordTips . length )
You can’t perform that action at this time.
0 commit comments