refactor app status provider, adding loading texts
This commit is contained in:
parent
5409f6fde1
commit
18c693dabc
3 changed files with 13 additions and 6 deletions
12
src/errorLoadingScreenHelpers.ts
Normal file
12
src/errorLoadingScreenHelpers.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
export const guessProblem = (errorMessage: string) => {
|
||||
if (errorMessage.endsWith('Socket error: ECONNREFUSED')) {
|
||||
return 'Most probably the server is not running.'
|
||||
}
|
||||
}
|
||||
|
||||
export const loadingTexts = [
|
||||
'Like the project? Give us a star on GitHub or rate us on AlternativeTo!',
|
||||
'To stay updated with the latest changes, go to the GitHub page, click on "Watch", choose "Custom", and then opt for "Releases"!',
|
||||
'Upvote features on GitHub issues to help us prioritize them!',
|
||||
'Want to contribute to the project? Check out Contributing.md on GitHub!',
|
||||
]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
export const guessProblem = (errorMessage: string) => {
|
||||
if (errorMessage.endsWith('Socket error: ECONNREFUSED')) {
|
||||
return 'Most probably the server is not running.'
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@ import { useEffect } from 'react'
|
|||
import { activeModalStack, activeModalStacks, hideModal, insertActiveModalStack, miscUiState } from '../globalState'
|
||||
import { resetLocalStorageWorld } from '../browserfs'
|
||||
import { fsState } from '../loadSave'
|
||||
import { guessProblem } from '../guessProblem'
|
||||
import { guessProblem } from '../errorLoadingScreenHelpers'
|
||||
import AppStatus from './AppStatus'
|
||||
import DiveTransition from './DiveTransition'
|
||||
import { useDidUpdateEffect } from './utils'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue