aboutsummaryrefslogtreecommitdiffstats
path: root/components/Splash.js
diff options
context:
space:
mode:
Diffstat (limited to 'components/Splash.js')
-rw-r--r--components/Splash.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/components/Splash.js b/components/Splash.js
index 7976de4..f807202 100644
--- a/components/Splash.js
+++ b/components/Splash.js
@@ -1,13 +1,18 @@
import styles from 'styles/Main.module.scss'
import React from 'react'
+import useSettings from 'hooks/useSettings'
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'
import {faBan, faSpinner} from '@fortawesome/free-solid-svg-icons'
-const Splash = ({type, fixed = false}) => (
- <div className={`${type === 'connection' ? styles.connection : styles.loader} ${fixed ? styles.fixed : ''}`}>
- <FontAwesomeIcon icon={type === 'connection' ? faBan : faSpinner} />
- <p>{type === 'connection' ? 'No connection' : 'Loading...'}</p>
- </div>
-)
+const Splash = ({type, fixed = false}) => {
+ const {t} = useSettings()
+
+ return (
+ <div className={`${type === 'connection' ? styles.connection : styles.loader} ${fixed ? styles.fixed : ''}`}>
+ <FontAwesomeIcon icon={type === 'connection' ? faBan : faSpinner} />
+ <p>{type === 'connection' ? t('no_connection') : t('loading')}</p>
+ </div>
+ )
+}
export default Splash