gatsby-theme-q3 4.5.16 → 4.5.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/.eslintrc.js +12 -12
  2. package/CHANGELOG.md +1181 -1164
  3. package/LICENSE +21 -21
  4. package/__fixtures__/en/titles.json +2 -2
  5. package/__fixtures__/fr/titles.json +2 -2
  6. package/gatsby-browser.js +38 -38
  7. package/gatsby-config.js +62 -62
  8. package/gatsby-node.js +77 -77
  9. package/gatsby-ssr.js +11 -20
  10. package/index.js +1 -1
  11. package/lib/components/AccountPublicGateway.js +2 -3
  12. package/lib/components/AdminLoader.js +2 -3
  13. package/lib/components/AdminPrivateGateway.js +3 -4
  14. package/lib/components/AdminPublicGateway.js +3 -4
  15. package/lib/components/AdminRouter.js +3 -4
  16. package/lib/components/BlogArchiveTemplate.js +2 -3
  17. package/lib/components/BlogTemplate.js +2 -3
  18. package/lib/components/FormBox.js +2 -3
  19. package/lib/components/FormBoxContent.js +2 -3
  20. package/lib/components/FormBoxNotice.js +2 -3
  21. package/lib/components/IsBrowserReady.js +2 -3
  22. package/lib/components/PageWrapper.js +2 -3
  23. package/lib/components/PublicTemplate.js +2 -3
  24. package/lib/components/Redirect.js +2 -3
  25. package/lib/components/RedirectToIndex.js +2 -3
  26. package/lib/components/RichText.js +2 -3
  27. package/lib/components/SearchEngine.js +4 -7
  28. package/lib/components/ShareButton.js +2 -3
  29. package/lib/components/Wrapper.js +2 -3
  30. package/lib/components/__tests__/useSiteMetaData.test.js +44 -44
  31. package/lib/components/__tests__/withAuthenticate.test.js +2 -2
  32. package/lib/components/__tests__/withSuccessOp.test.js +4 -4
  33. package/lib/components/index.js +2 -3
  34. package/lib/components/useSiteMetaData.js +1 -1
  35. package/lib/components/utils.js +2 -3
  36. package/lib/components/withAuthenticate.js +2 -2
  37. package/lib/components/withPublicTemplate.js +2 -3
  38. package/lib/components/withSuccessOp.js +3 -4
  39. package/lib/pages/404.js +2 -3
  40. package/lib/pages/login.js +2 -3
  41. package/lib/pages/password-change.js +2 -3
  42. package/lib/pages/password-reset.js +2 -3
  43. package/lib/pages/reverify.js +2 -3
  44. package/lib/pages/verify.js +2 -3
  45. package/package.json +5 -5
  46. package/src/components/AccountPublicGateway.jsx +18 -18
  47. package/src/components/AdminLoader.jsx +16 -16
  48. package/src/components/AdminPrivateGateway.jsx +37 -37
  49. package/src/components/AdminPublicGateway.jsx +34 -34
  50. package/src/components/AdminRouter.jsx +44 -44
  51. package/src/components/BlogArchiveTemplate.jsx +55 -55
  52. package/src/components/BlogTemplate.jsx +104 -104
  53. package/src/components/FormBox.jsx +22 -22
  54. package/src/components/FormBoxContent.jsx +26 -26
  55. package/src/components/FormBoxNotice.jsx +21 -21
  56. package/src/components/IsBrowserReady.jsx +13 -13
  57. package/src/components/PageWrapper.jsx +20 -20
  58. package/src/components/PublicTemplate.jsx +198 -198
  59. package/src/components/Redirect.jsx +13 -13
  60. package/src/components/RedirectToIndex.jsx +9 -9
  61. package/src/components/RichText.jsx +196 -196
  62. package/src/components/SearchEngine.jsx +124 -124
  63. package/src/components/ShareButton.jsx +80 -80
  64. package/src/components/Wrapper.jsx +14 -14
  65. package/src/components/__tests__/SearchEngine.test.jsx +58 -58
  66. package/src/components/__tests__/useSiteMetaData.test.js +44 -44
  67. package/src/components/__tests__/withAuthenticate.test.jsx +52 -52
  68. package/src/components/__tests__/withSuccessOp.test.jsx +57 -57
  69. package/src/components/index.js +16 -16
  70. package/src/components/useSiteMetaData.js +35 -35
  71. package/src/components/utils.js +23 -23
  72. package/src/components/withAuthenticate.jsx +20 -20
  73. package/src/components/withPublicTemplate.jsx +11 -11
  74. package/src/components/withSuccessOp.jsx +43 -43
  75. package/src/pages/404.jsx +31 -31
  76. package/src/pages/login.jsx +71 -71
  77. package/src/pages/password-change.jsx +72 -72
  78. package/src/pages/password-reset.jsx +47 -47
  79. package/src/pages/reverify.jsx +72 -72
  80. package/src/pages/verify.jsx +70 -70
@@ -1,37 +1,37 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { navigate } from 'gatsby';
4
- import { Gatekeeper } from 'q3-admin/lib/containers';
5
- import IsBrowserReady from './IsBrowserReady';
6
-
7
- const AdminPrivateGateway = ({
8
- children,
9
- GatekeepProps,
10
- // for legacy purposes (for now)
11
- ...rest
12
- }) => (
13
- <IsBrowserReady>
14
- <Gatekeeper
15
- navigate={navigate}
16
- redirectPathOnPublic="/login"
17
- {...rest}
18
- {...GatekeepProps}
19
- >
20
- {children}
21
- </Gatekeeper>
22
- </IsBrowserReady>
23
- );
24
-
25
- AdminPrivateGateway.defaultProps = {
26
- GatekeepProps: {},
27
- children: null,
28
- };
29
-
30
- AdminPrivateGateway.propTypes = {
31
- GatekeepProps: PropTypes.shape({
32
- redirectCheck: PropTypes.func,
33
- }),
34
- children: PropTypes.node,
35
- };
36
-
37
- export default AdminPrivateGateway;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { navigate } from 'gatsby';
4
+ import { Gatekeeper } from 'q3-admin/lib/containers';
5
+ import IsBrowserReady from './IsBrowserReady';
6
+
7
+ const AdminPrivateGateway = ({
8
+ children,
9
+ GatekeepProps,
10
+ // for legacy purposes (for now)
11
+ ...rest
12
+ }) => (
13
+ <IsBrowserReady>
14
+ <Gatekeeper
15
+ navigate={navigate}
16
+ redirectPathOnPublic="/login"
17
+ {...rest}
18
+ {...GatekeepProps}
19
+ >
20
+ {children}
21
+ </Gatekeeper>
22
+ </IsBrowserReady>
23
+ );
24
+
25
+ AdminPrivateGateway.defaultProps = {
26
+ GatekeepProps: {},
27
+ children: null,
28
+ };
29
+
30
+ AdminPrivateGateway.propTypes = {
31
+ GatekeepProps: PropTypes.shape({
32
+ redirectCheck: PropTypes.func,
33
+ }),
34
+ children: PropTypes.node,
35
+ };
36
+
37
+ export default AdminPrivateGateway;
@@ -1,34 +1,34 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { navigate } from 'gatsby';
4
- import { Gatekeeper } from 'q3-admin/lib/containers';
5
- import IsBrowserReady from './IsBrowserReady';
6
-
7
- const AdminPublicGateway = ({
8
- children,
9
- GatekeepProps,
10
- }) => (
11
- <IsBrowserReady>
12
- <Gatekeeper
13
- navigate={navigate}
14
- redirectPathOnSession="/app"
15
- {...GatekeepProps}
16
- >
17
- {children}
18
- </Gatekeeper>
19
- </IsBrowserReady>
20
- );
21
-
22
- AdminPublicGateway.defaultProps = {
23
- GatekeepProps: {},
24
- children: null,
25
- };
26
-
27
- AdminPublicGateway.propTypes = {
28
- GatekeepProps: PropTypes.shape({
29
- redirectCheck: PropTypes.func,
30
- }),
31
- children: PropTypes.node,
32
- };
33
-
34
- export default AdminPublicGateway;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { navigate } from 'gatsby';
4
+ import { Gatekeeper } from 'q3-admin/lib/containers';
5
+ import IsBrowserReady from './IsBrowserReady';
6
+
7
+ const AdminPublicGateway = ({
8
+ children,
9
+ GatekeepProps,
10
+ }) => (
11
+ <IsBrowserReady>
12
+ <Gatekeeper
13
+ navigate={navigate}
14
+ redirectPathOnSession="/app"
15
+ {...GatekeepProps}
16
+ >
17
+ {children}
18
+ </Gatekeeper>
19
+ </IsBrowserReady>
20
+ );
21
+
22
+ AdminPublicGateway.defaultProps = {
23
+ GatekeepProps: {},
24
+ children: null,
25
+ };
26
+
27
+ AdminPublicGateway.propTypes = {
28
+ GatekeepProps: PropTypes.shape({
29
+ redirectCheck: PropTypes.func,
30
+ }),
31
+ children: PropTypes.node,
32
+ };
33
+
34
+ export default AdminPublicGateway;
@@ -1,44 +1,44 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { Router } from '@reach/router';
4
- import AdminApp from 'q3-admin';
5
- import AdminPrivateGateway from './AdminPrivateGateway';
6
- import useSiteMetaData from './useSiteMetaData';
7
-
8
- const AdminRouter = ({ AdminProps, GatekeepProps }) => {
9
- const { appDirectory: basepath, logo: logoSrc } =
10
- useSiteMetaData();
11
-
12
- return (
13
- <AdminPrivateGateway GatekeepProps={GatekeepProps}>
14
- <Router basepath={basepath}>
15
- <AdminApp
16
- {...AdminProps}
17
- path="*"
18
- AppProps={{
19
- directory: basepath,
20
- ...AdminProps?.AppProps,
21
- }}
22
- NavProps={{
23
- logoSrc,
24
- ...AdminProps?.NavProps,
25
- }}
26
- />
27
- </Router>
28
- </AdminPrivateGateway>
29
- );
30
- };
31
-
32
- AdminRouter.defaultProps = {
33
- AdminProps: {},
34
- GatekeepProps: {},
35
- };
36
-
37
- AdminRouter.propTypes = {
38
- // eslint-disable-next-line
39
- AdminProps: PropTypes.object,
40
- // eslint-disable-next-line
41
- GatekeepProps: PropTypes.object,
42
- };
43
-
44
- export default AdminRouter;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Router } from '@reach/router';
4
+ import AdminApp from 'q3-admin';
5
+ import AdminPrivateGateway from './AdminPrivateGateway';
6
+ import useSiteMetaData from './useSiteMetaData';
7
+
8
+ const AdminRouter = ({ AdminProps, GatekeepProps }) => {
9
+ const { appDirectory: basepath, logo: logoSrc } =
10
+ useSiteMetaData();
11
+
12
+ return (
13
+ <AdminPrivateGateway GatekeepProps={GatekeepProps}>
14
+ <Router basepath={basepath}>
15
+ <AdminApp
16
+ {...AdminProps}
17
+ path="*"
18
+ AppProps={{
19
+ directory: basepath,
20
+ ...AdminProps?.AppProps,
21
+ }}
22
+ NavProps={{
23
+ logoSrc,
24
+ ...AdminProps?.NavProps,
25
+ }}
26
+ />
27
+ </Router>
28
+ </AdminPrivateGateway>
29
+ );
30
+ };
31
+
32
+ AdminRouter.defaultProps = {
33
+ AdminProps: {},
34
+ GatekeepProps: {},
35
+ };
36
+
37
+ AdminRouter.propTypes = {
38
+ // eslint-disable-next-line
39
+ AdminProps: PropTypes.object,
40
+ // eslint-disable-next-line
41
+ GatekeepProps: PropTypes.object,
42
+ };
43
+
44
+ export default AdminRouter;
@@ -1,55 +1,55 @@
1
- import React from 'react';
2
- import { get } from 'lodash';
3
- import { navigate } from '@reach/router';
4
- import PropTypes from 'prop-types';
5
- import { News as NewsCard } from 'q3-ui/lib/card';
6
- import Wrapper from 'q3-ui/lib/wrapper';
7
- import Grid from '@material-ui/core/Grid';
8
- import Box from '@material-ui/core/Box';
9
- import Pagination from '@material-ui/lab/Pagination';
10
-
11
- const BlogArchiveTemplate = ({
12
- blogs,
13
- pageNum,
14
- total,
15
- dir,
16
- }) => (
17
- <Wrapper backgroundColor="transparent">
18
- <Grid container spacing={1}>
19
- {blogs.map((blog) => (
20
- <NewsCard
21
- md={3}
22
- title={blog.title}
23
- description={get(blog, 'description.description')}
24
- imgSrc={get(blog, 'image.fixed.src')}
25
- to={blog.to}
26
- />
27
- ))}
28
- </Grid>
29
- <Box my={2}>
30
- {dir && (
31
- <Pagination
32
- defaultPage={pageNum + 1}
33
- count={total}
34
- onChange={(e, num) =>
35
- navigate(`/${dir}/${num > 1 ? num : ''}`)
36
- }
37
- />
38
- )}
39
- </Box>
40
- </Wrapper>
41
- );
42
-
43
- BlogArchiveTemplate.propTypes = {
44
- blogs: PropTypes.arrayOf(
45
- PropTypes.shape({
46
- title: PropTypes.string,
47
- description: PropTypes.description,
48
- }),
49
- ).isRequired,
50
- pageNum: PropTypes.number.isRequired,
51
- total: PropTypes.number.isRequired,
52
- dir: PropTypes.string.isRequired,
53
- };
54
-
55
- export default BlogArchiveTemplate;
1
+ import React from 'react';
2
+ import { get } from 'lodash';
3
+ import { navigate } from '@reach/router';
4
+ import PropTypes from 'prop-types';
5
+ import { News as NewsCard } from 'q3-ui/lib/card';
6
+ import Wrapper from 'q3-ui/lib/wrapper';
7
+ import Grid from '@material-ui/core/Grid';
8
+ import Box from '@material-ui/core/Box';
9
+ import Pagination from '@material-ui/lab/Pagination';
10
+
11
+ const BlogArchiveTemplate = ({
12
+ blogs,
13
+ pageNum,
14
+ total,
15
+ dir,
16
+ }) => (
17
+ <Wrapper backgroundColor="transparent">
18
+ <Grid container spacing={1}>
19
+ {blogs.map((blog) => (
20
+ <NewsCard
21
+ md={3}
22
+ title={blog.title}
23
+ description={get(blog, 'description.description')}
24
+ imgSrc={get(blog, 'image.fixed.src')}
25
+ to={blog.to}
26
+ />
27
+ ))}
28
+ </Grid>
29
+ <Box my={2}>
30
+ {dir && (
31
+ <Pagination
32
+ defaultPage={pageNum + 1}
33
+ count={total}
34
+ onChange={(e, num) =>
35
+ navigate(`/${dir}/${num > 1 ? num : ''}`)
36
+ }
37
+ />
38
+ )}
39
+ </Box>
40
+ </Wrapper>
41
+ );
42
+
43
+ BlogArchiveTemplate.propTypes = {
44
+ blogs: PropTypes.arrayOf(
45
+ PropTypes.shape({
46
+ title: PropTypes.string,
47
+ description: PropTypes.description,
48
+ }),
49
+ ).isRequired,
50
+ pageNum: PropTypes.number.isRequired,
51
+ total: PropTypes.number.isRequired,
52
+ dir: PropTypes.string.isRequired,
53
+ };
54
+
55
+ export default BlogArchiveTemplate;
@@ -1,104 +1,104 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { get } from 'lodash';
4
- import { navigate } from '@reach/router';
5
- import moment from 'moment';
6
- import Image from 'gatsby-image';
7
- import Box from '@material-ui/core/Box';
8
- import Container from '@material-ui/core/Container';
9
- import Typography from '@material-ui/core/Typography';
10
- import Grid from '@material-ui/core/Grid';
11
- import TodayIcon from '@material-ui/icons/Today';
12
- import Breadcrumbs from 'q3-ui/lib/breadcrumbs';
13
- import Wrapper from 'q3-ui/lib/wrapper';
14
- import Pagination from 'q3-ui/lib/pagination';
15
- import RichText from './RichText';
16
- import SocialShare from './ShareButton';
17
- import SearchEngine from './SearchEngine';
18
-
19
- const BlogTemplateSharePublication = ({ publishedOn }) => (
20
- <Grid container spacing={1}>
21
- {publishedOn && (
22
- <Grid item>
23
- <TodayIcon /> {moment.format('LL')}
24
- </Grid>
25
- )}
26
- <Grid item>
27
- <Grid container>
28
- <SocialShare platform="Facebook" />
29
- <SocialShare platform="Twitter" />
30
- <SocialShare platform="LinkedIn" />
31
- <SocialShare platform="Email" />
32
- </Grid>
33
- </Grid>
34
- </Grid>
35
- );
36
-
37
- BlogTemplateSharePublication.propTypes = {
38
- publishedOn: PropTypes.string,
39
- };
40
-
41
- BlogTemplateSharePublication.defaultProps = {
42
- publishedOn: null,
43
- };
44
-
45
- const BlogTemplate = ({ current, prev, next }) => (
46
- <Box my={2}>
47
- <SearchEngine
48
- title={current.title}
49
- description={get(current, 'description.description')}
50
- />
51
- <Wrapper backgroundColor="#FFF">
52
- <Container component="article" maxWidth="md">
53
- <Breadcrumbs root="/" mode="light" />
54
- <Typography variant="h1" gutterBottom>
55
- {current.title}
56
- </Typography>
57
- {current.subtitle && (
58
- <Box mb={3}>
59
- <Typography variant="body2" gutterBottom>
60
- {current.subtitle}
61
- </Typography>
62
- </Box>
63
- )}
64
- <BlogTemplateSharePublication
65
- publishedOn={current.publishedOn}
66
- />
67
-
68
- {current.image && (
69
- <Box my={3}>
70
- <Image
71
- style={{ maxWidth: '100%' }}
72
- fixed={current.image.fixed}
73
- alt={current.image.title}
74
- />
75
- </Box>
76
- )}
77
- <RichText json={get(current, 'body.json')} />
78
- <Pagination
79
- nextDescription={get(next, 'title')}
80
- prevDescription={get(prev, 'title')}
81
- onNext={() => navigate(next.to)}
82
- onPrev={() => navigate(prev.to)}
83
- />
84
- </Container>
85
- </Wrapper>
86
- </Box>
87
- );
88
-
89
- BlogTemplate.propTypes = {
90
- current: PropTypes.shape({
91
- title: PropTypes.string,
92
- subtitle: PropTypes.string,
93
- publishedOn: PropTypes.string,
94
- image: PropTypes.object,
95
- }).isRequired,
96
- next: PropTypes.shape({
97
- to: PropTypes.string,
98
- }).isRequired,
99
- prev: PropTypes.shape({
100
- to: PropTypes.string,
101
- }).isRequired,
102
- };
103
-
104
- export default BlogTemplate;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { get } from 'lodash';
4
+ import { navigate } from '@reach/router';
5
+ import moment from 'moment';
6
+ import Image from 'gatsby-image';
7
+ import Box from '@material-ui/core/Box';
8
+ import Container from '@material-ui/core/Container';
9
+ import Typography from '@material-ui/core/Typography';
10
+ import Grid from '@material-ui/core/Grid';
11
+ import TodayIcon from '@material-ui/icons/Today';
12
+ import Breadcrumbs from 'q3-ui/lib/breadcrumbs';
13
+ import Wrapper from 'q3-ui/lib/wrapper';
14
+ import Pagination from 'q3-ui/lib/pagination';
15
+ import RichText from './RichText';
16
+ import SocialShare from './ShareButton';
17
+ import SearchEngine from './SearchEngine';
18
+
19
+ const BlogTemplateSharePublication = ({ publishedOn }) => (
20
+ <Grid container spacing={1}>
21
+ {publishedOn && (
22
+ <Grid item>
23
+ <TodayIcon /> {moment.format('LL')}
24
+ </Grid>
25
+ )}
26
+ <Grid item>
27
+ <Grid container>
28
+ <SocialShare platform="Facebook" />
29
+ <SocialShare platform="Twitter" />
30
+ <SocialShare platform="LinkedIn" />
31
+ <SocialShare platform="Email" />
32
+ </Grid>
33
+ </Grid>
34
+ </Grid>
35
+ );
36
+
37
+ BlogTemplateSharePublication.propTypes = {
38
+ publishedOn: PropTypes.string,
39
+ };
40
+
41
+ BlogTemplateSharePublication.defaultProps = {
42
+ publishedOn: null,
43
+ };
44
+
45
+ const BlogTemplate = ({ current, prev, next }) => (
46
+ <Box my={2}>
47
+ <SearchEngine
48
+ title={current.title}
49
+ description={get(current, 'description.description')}
50
+ />
51
+ <Wrapper backgroundColor="#FFF">
52
+ <Container component="article" maxWidth="md">
53
+ <Breadcrumbs root="/" mode="light" />
54
+ <Typography variant="h1" gutterBottom>
55
+ {current.title}
56
+ </Typography>
57
+ {current.subtitle && (
58
+ <Box mb={3}>
59
+ <Typography variant="body2" gutterBottom>
60
+ {current.subtitle}
61
+ </Typography>
62
+ </Box>
63
+ )}
64
+ <BlogTemplateSharePublication
65
+ publishedOn={current.publishedOn}
66
+ />
67
+
68
+ {current.image && (
69
+ <Box my={3}>
70
+ <Image
71
+ style={{ maxWidth: '100%' }}
72
+ fixed={current.image.fixed}
73
+ alt={current.image.title}
74
+ />
75
+ </Box>
76
+ )}
77
+ <RichText json={get(current, 'body.json')} />
78
+ <Pagination
79
+ nextDescription={get(next, 'title')}
80
+ prevDescription={get(prev, 'title')}
81
+ onNext={() => navigate(next.to)}
82
+ onPrev={() => navigate(prev.to)}
83
+ />
84
+ </Container>
85
+ </Wrapper>
86
+ </Box>
87
+ );
88
+
89
+ BlogTemplate.propTypes = {
90
+ current: PropTypes.shape({
91
+ title: PropTypes.string,
92
+ subtitle: PropTypes.string,
93
+ publishedOn: PropTypes.string,
94
+ image: PropTypes.object,
95
+ }).isRequired,
96
+ next: PropTypes.shape({
97
+ to: PropTypes.string,
98
+ }).isRequired,
99
+ prev: PropTypes.shape({
100
+ to: PropTypes.string,
101
+ }).isRequired,
102
+ };
103
+
104
+ export default BlogTemplate;
@@ -1,22 +1,22 @@
1
- import React from 'react';
2
- import Box from '@material-ui/core/Box';
3
- import PropTypes from 'prop-types';
4
-
5
- const FormBox = ({ renderBottom, renderTop }) => (
6
- <Box
7
- component="section"
8
- width="100%"
9
- maxWidth="650px"
10
- p={0.5}
11
- >
12
- {renderTop}
13
- <Box mt={1}>{renderBottom}</Box>
14
- </Box>
15
- );
16
-
17
- FormBox.propTypes = {
18
- renderBottom: PropTypes.node.isRequired,
19
- renderTop: PropTypes.node.isRequired,
20
- };
21
-
22
- export default FormBox;
1
+ import React from 'react';
2
+ import Box from '@material-ui/core/Box';
3
+ import PropTypes from 'prop-types';
4
+
5
+ const FormBox = ({ renderBottom, renderTop }) => (
6
+ <Box
7
+ component="section"
8
+ width="100%"
9
+ maxWidth="650px"
10
+ p={0.5}
11
+ >
12
+ {renderTop}
13
+ <Box mt={1}>{renderBottom}</Box>
14
+ </Box>
15
+ );
16
+
17
+ FormBox.propTypes = {
18
+ renderBottom: PropTypes.node.isRequired,
19
+ renderTop: PropTypes.node.isRequired,
20
+ };
21
+
22
+ export default FormBox;
@@ -1,26 +1,26 @@
1
- import React from 'react';
2
- import { useTranslation } from 'q3-ui-locale';
3
- import PropTypes from 'prop-types';
4
- import Typography from '@material-ui/core/Typography';
5
-
6
- const FormBoxContent = ({ title, description }) => {
7
- const { t } = useTranslation();
8
-
9
- return (
10
- <>
11
- <Typography component="h1" variant="h2" gutterBottom>
12
- {t(`titles:${title}`)}
13
- </Typography>
14
- <Typography gutterBottom>
15
- {t(`descriptions:${description}`)}
16
- </Typography>
17
- </>
18
- );
19
- };
20
-
21
- FormBoxContent.propTypes = {
22
- title: PropTypes.string.isRequired,
23
- description: PropTypes.string.isRequired,
24
- };
25
-
26
- export default FormBoxContent;
1
+ import React from 'react';
2
+ import { useTranslation } from 'q3-ui-locale';
3
+ import PropTypes from 'prop-types';
4
+ import Typography from '@material-ui/core/Typography';
5
+
6
+ const FormBoxContent = ({ title, description }) => {
7
+ const { t } = useTranslation();
8
+
9
+ return (
10
+ <>
11
+ <Typography component="h1" variant="h2" gutterBottom>
12
+ {t(`titles:${title}`)}
13
+ </Typography>
14
+ <Typography gutterBottom>
15
+ {t(`descriptions:${description}`)}
16
+ </Typography>
17
+ </>
18
+ );
19
+ };
20
+
21
+ FormBoxContent.propTypes = {
22
+ title: PropTypes.string.isRequired,
23
+ description: PropTypes.string.isRequired,
24
+ };
25
+
26
+ export default FormBoxContent;