-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathLayout.js
More file actions
61 lines (55 loc) · 1.61 KB
/
Layout.js
File metadata and controls
61 lines (55 loc) · 1.61 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import Header from '../Header';
import Footer from '../Footer';
import SidebarContainer from '../../../containers/SidebarContainer';
import { getConfigVar } from '../../../helpers/config.js';
const title = getConfigVar('TITLE');
const Layout = ({
isLoggedIn,
pendingFetchOperations,
children,
lang,
setLang,
currentUrl,
availableLangs,
relatedGroupId,
memberGroups,
fetchManyGroupsStatus,
colorTheme,
}) => {
return (
<div className="app-wrapper overflow-visible text-body bg-body" data-bs-theme={colorTheme}>
<Helmet defaultTitle={`${title}`} titleTemplate={`%s | ${title}`} />
<Header
isLoggedIn={isLoggedIn}
availableLangs={availableLangs}
currentLang={lang}
setLang={setLang}
currentUrl={currentUrl}
relatedGroupId={relatedGroupId}
memberGroups={memberGroups}
fetchManyGroupsStatus={fetchManyGroupsStatus}
/>
<SidebarContainer currentUrl={currentUrl} pendingFetchOperations={pendingFetchOperations} />
{children}
<Footer version={process.env.VERSION} />
</div>
);
};
Layout.propTypes = {
isLoggedIn: PropTypes.bool,
pendingFetchOperations: PropTypes.bool,
onCloseSidebar: PropTypes.func,
children: PropTypes.element,
lang: PropTypes.string,
setLang: PropTypes.func.isRequired,
currentUrl: PropTypes.string,
availableLangs: PropTypes.array,
relatedGroupId: PropTypes.string,
memberGroups: PropTypes.object.isRequired,
fetchManyGroupsStatus: PropTypes.string,
colorTheme: PropTypes.string,
};
export default Layout;