aboutsummaryrefslogtreecommitdiffstats
path: root/components/Splash.js
blob: 7976de417bbae0b97424430eba61236583a767ac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import styles from 'styles/Main.module.scss'
import React from 'react'
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>
)

export default Splash