blob: d5627e3edba96c73f29a8b798094c269ff9f3fae (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import styles from 'styles/Main.module.scss'
import React from 'react'
import Head from 'next/head'
import {Header, Popup, Splash} from 'components'
import useSettings from 'hooks/useSettings'
import PropTypes from 'prop-types'
const Layout = ({
children,
apps,
setApps,
}) => {
const {settings} = useSettings()
if (!settings || !settings.theme || !settings.language) return <Splash fixed />
return (
<section className={styles.layout +' '+ settings.theme}>
<Head>
<title>My Apps</title>
</Head>
<main>
<div className="container">{children}</div>
</main>
<Header apps={apps} setApps={setApps} />
<Popup/>
</section>
)
}
export default Layout
Layout.propTypes = {
children: PropTypes.node,
}
|