diff --git a/src/errorLoadingScreenHelpers.ts b/src/errorLoadingScreenHelpers.ts new file mode 100644 index 00000000..2f882f89 --- /dev/null +++ b/src/errorLoadingScreenHelpers.ts @@ -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!', +] diff --git a/src/guessProblem.ts b/src/guessProblem.ts deleted file mode 100644 index ecc7dbf1..00000000 --- a/src/guessProblem.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const guessProblem = (errorMessage: string) => { - if (errorMessage.endsWith('Socket error: ECONNREFUSED')) { - return 'Most probably the server is not running.' - } -} diff --git a/src/react/AppStatusProvider.tsx b/src/react/AppStatusProvider.tsx index 6ae39308..a2f6234a 100644 --- a/src/react/AppStatusProvider.tsx +++ b/src/react/AppStatusProvider.tsx @@ -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'