1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00
commons/client/src/App.tsx

38 lines
1.1 KiB
TypeScript
Raw Normal View History

2019-01-23 11:15:27 +01:00
import React, { Component } from 'react'
import { BrowserRouter as Router } from 'react-router-dom'
2019-03-25 18:03:49 +01:00
import Header from './components/organisms/Header'
import Footer from './components/organisms/Footer'
2019-02-13 12:39:04 +01:00
import Spinner from './components/atoms/Spinner'
import { User } from './context'
2019-01-30 17:33:56 +01:00
import Routes from './Routes'
2019-01-23 13:03:41 +01:00
import './styles/global.scss'
import styles from './App.module.scss'
2019-01-23 13:03:41 +01:00
export default class App extends Component {
public render() {
return (
2019-04-30 19:19:28 +02:00
<div className={styles.app}>
<Router>
<>
<Header />
2019-02-08 14:06:55 +01:00
2019-04-30 19:19:28 +02:00
<main className={styles.main}>
{this.context.isLoading ? (
<div className={styles.loader}>
<Spinner message={this.context.message} />
</div>
) : (
<Routes />
)}
</main>
2019-02-08 14:06:55 +01:00
2019-04-30 19:19:28 +02:00
<Footer />
</>
</Router>
</div>
)
}
}
2019-04-30 19:19:28 +02:00
App.contextType = User