@plone/volto 17.0.0-alpha.16 → 17.0.0-alpha.18

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 (45) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/CHANGELOG.md +59 -0
  3. package/cypress/support/commands.js +17 -0
  4. package/locales/it/LC_MESSAGES/volto.po +1 -1
  5. package/locales/it.json +1 -1
  6. package/package.json +2 -2
  7. package/packages/volto-slate/package.json +1 -1
  8. package/packages/volto-slate/src/blocks/Table/TableBlockEdit.jsx +21 -212
  9. package/packages/volto-slate/src/blocks/Table/schema.js +122 -0
  10. package/packages/volto-slate/src/editor/plugins/StyleMenu/utils.js +14 -5
  11. package/packages/volto-slate/src/utils/blocks.js +7 -0
  12. package/packages/volto-slate/src/widgets/RichTextWidget.jsx +15 -8
  13. package/src/components/manage/Blocks/Grid/View.jsx +1 -0
  14. package/src/components/manage/Blocks/Listing/withQuerystringResults.jsx +3 -4
  15. package/src/components/manage/Blocks/Search/components/Facets.jsx +6 -2
  16. package/src/components/manage/Blocks/Teaser/Body.jsx +0 -1
  17. package/src/components/manage/Blocks/Teaser/DefaultBody.jsx +20 -15
  18. package/src/components/manage/Blocks/ToC/Schema.jsx +5 -1
  19. package/src/components/manage/Blocks/ToC/variations/HorizontalMenu.jsx +142 -8
  20. package/src/components/manage/UniversalLink/UniversalLink.jsx +2 -6
  21. package/src/components/manage/UniversalLink/UniversalLink.test.jsx +36 -0
  22. package/src/components/theme/Anontools/Anontools.jsx +3 -4
  23. package/src/components/theme/Breadcrumbs/Breadcrumbs.jsx +52 -99
  24. package/src/components/theme/Breadcrumbs/Breadcrumbs.stories.jsx +14 -13
  25. package/src/components/theme/Comments/CommentEditModal.jsx +63 -115
  26. package/src/components/theme/ContactForm/ContactForm.jsx +108 -192
  27. package/src/components/theme/ContactForm/ContactForm.stories.jsx +1 -1
  28. package/src/components/theme/ContactForm/ContactForm.test.jsx +2 -3
  29. package/src/components/theme/Header/Header.jsx +2 -2
  30. package/src/components/theme/Login/Login.jsx +1 -1
  31. package/src/components/theme/SearchWidget/SearchWidget.jsx +38 -98
  32. package/src/components/theme/View/AlbumView.jsx +9 -1
  33. package/src/components/theme/View/EventView.jsx +6 -2
  34. package/src/components/theme/View/FileView.jsx +23 -18
  35. package/src/components/theme/View/ImageView.jsx +37 -32
  36. package/src/components/theme/View/LinkView.jsx +53 -78
  37. package/src/components/theme/View/ListingView.jsx +33 -27
  38. package/src/components/theme/View/SummaryView.jsx +47 -38
  39. package/src/components/theme/View/TabularView.jsx +59 -53
  40. package/src/hooks/client/useClient.js +11 -0
  41. package/src/hooks/index.js +1 -1
  42. package/theme/themes/pastanaga/extras/main.less +2 -1
  43. package/theme/themes/pastanaga/extras/toc.less +29 -0
  44. package/src/hooks/content/useContent.js +0 -31
  45. package/src/hooks/userSession/useToken.js +0 -5
@@ -5,11 +5,11 @@
5
5
 
6
6
  import React from 'react';
7
7
  import PropTypes from 'prop-types';
8
- import { Container } from 'semantic-ui-react';
8
+ import { Container as SemanticContainer } from 'semantic-ui-react';
9
9
  import { FormattedMessage } from 'react-intl';
10
10
  import prettybytes from 'pretty-bytes';
11
-
12
11
  import { flattenToAppURL } from '@plone/volto/helpers';
12
+ import config from '@plone/volto/registry';
13
13
 
14
14
  /**
15
15
  * Image view component class.
@@ -17,37 +17,42 @@ import { flattenToAppURL } from '@plone/volto/helpers';
17
17
  * @params {object} content Content object.
18
18
  * @returns {string} Markup of the component.
19
19
  */
20
- const ImageView = ({ content }) => (
21
- <Container className="view-wrapper">
22
- <h1 className="documentFirstHeading">
23
- {content.title}
24
- {content.subtitle && ` - ${content.subtitle}`}
25
- </h1>
26
- {content.description && (
27
- <p className="documentDescription">{content.description}</p>
28
- )}
29
- {content?.image?.download && (
30
- <a href={flattenToAppURL(content.image.download)}>
31
- <img
32
- alt={content.title}
33
- src={flattenToAppURL(content.image.scales.preview.download)}
34
- />
35
- <figcaption>
36
- <FormattedMessage
37
- id="Size: {size}"
38
- defaultMessage="Size: {size}"
39
- values={{ size: prettybytes(content.image.size) }}
40
- />
41
- &nbsp; &mdash; &nbsp;
42
- <FormattedMessage
43
- id="Click to download full sized image"
44
- defaultMessage="Click to download full sized image"
20
+ const ImageView = ({ content }) => {
21
+ const Container =
22
+ config.getComponent({ name: 'Container' }).component || SemanticContainer;
23
+
24
+ return (
25
+ <Container className="view-wrapper">
26
+ <h1 className="documentFirstHeading">
27
+ {content.title}
28
+ {content.subtitle && ` - ${content.subtitle}`}
29
+ </h1>
30
+ {content.description && (
31
+ <p className="documentDescription">{content.description}</p>
32
+ )}
33
+ {content?.image?.download && (
34
+ <a href={flattenToAppURL(content.image.download)}>
35
+ <img
36
+ alt={content.title}
37
+ src={flattenToAppURL(content.image.scales.preview.download)}
45
38
  />
46
- </figcaption>
47
- </a>
48
- )}
49
- </Container>
50
- );
39
+ <figcaption>
40
+ <FormattedMessage
41
+ id="Size: {size}"
42
+ defaultMessage="Size: {size}"
43
+ values={{ size: prettybytes(content.image.size) }}
44
+ />
45
+ &nbsp; &mdash; &nbsp;
46
+ <FormattedMessage
47
+ id="Click to download full sized image"
48
+ defaultMessage="Click to download full sized image"
49
+ />
50
+ </figcaption>
51
+ </a>
52
+ )}
53
+ </Container>
54
+ );
55
+ };
51
56
 
52
57
  /**
53
58
  * Property types.
@@ -1,92 +1,67 @@
1
- /**
2
- * Link View.
3
- * @module components/theme/View/LinkView
4
- */
5
-
6
- import React, { Component } from 'react';
1
+ import { useEffect } from 'react';
7
2
  import PropTypes from 'prop-types';
3
+ import { useHistory } from 'react-router-dom';
8
4
  import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers';
9
- import { Container } from 'semantic-ui-react';
5
+ import { Container as SemanticContainer } from 'semantic-ui-react';
10
6
  import { UniversalLink } from '@plone/volto/components';
11
7
  import { FormattedMessage } from 'react-intl';
12
8
  import config from '@plone/volto/registry';
13
9
 
14
- /**
15
- * View container class.
16
- * @class View
17
- * @extends Component
18
- */
19
- class LinkView extends Component {
20
- /**
21
- * Property types.
22
- * @property {Object} propTypes Property types.
23
- * @static
24
- */
25
- static propTypes = {
26
- content: PropTypes.shape({
27
- title: PropTypes.string,
28
- description: PropTypes.string,
29
- remoteUrl: PropTypes.string,
30
- }),
31
- token: PropTypes.string,
32
- };
33
-
34
- /**
35
- * Default properties.
36
- * @property {Object} defaultProps Default properties.
37
- * @static
38
- */
39
- static defaultProps = {
40
- content: null,
41
- token: null,
42
- };
43
-
44
- componentDidMount() {
45
- if (!this.props.token) {
46
- const { remoteUrl } = this.props.content;
10
+ const LinkView = ({ token, content }) => {
11
+ const history = useHistory();
12
+ useEffect(() => {
13
+ if (!token) {
14
+ const { remoteUrl } = content;
47
15
  if (isInternalURL(remoteUrl)) {
48
- this.props.history.replace(flattenToAppURL(remoteUrl));
16
+ history.replace(flattenToAppURL(remoteUrl));
49
17
  } else if (!__SERVER__) {
50
18
  window.location.href = flattenToAppURL(remoteUrl);
51
19
  }
52
20
  }
53
- }
21
+ }, [content, history, token]);
22
+ const { title, description, remoteUrl } = content;
23
+ const { openExternalLinkInNewTab } = config.settings;
24
+ const Container =
25
+ config.getComponent({ name: 'Container' }).component || SemanticContainer;
26
+
27
+ return (
28
+ <Container id="page-document">
29
+ <h1 className="documentFirstHeading">{title}</h1>
30
+ {content.description && (
31
+ <p className="documentDescription">{description}</p>
32
+ )}
33
+ {remoteUrl && (
34
+ <p>
35
+ <FormattedMessage
36
+ id="The link address is:"
37
+ defaultMessage="The link address is:"
38
+ />{' '}
39
+ <UniversalLink
40
+ href={remoteUrl}
41
+ openLinkInNewTab={
42
+ openExternalLinkInNewTab && !isInternalURL(remoteUrl)
43
+ }
44
+ >
45
+ {flattenToAppURL(remoteUrl)}
46
+ </UniversalLink>
47
+ </p>
48
+ )}
49
+ </Container>
50
+ );
51
+ };
52
+
53
+ LinkView.propTypes = {
54
+ content: PropTypes.shape({
55
+ title: PropTypes.string,
56
+ description: PropTypes.string,
57
+ remoteUrl: PropTypes.string,
58
+ }),
59
+ token: PropTypes.string,
60
+ };
54
61
 
55
- /**
56
- * Render method.
57
- * @method render
58
- * @returns {string} Markup for the component.
59
- */
60
- render() {
61
- const { remoteUrl } = this.props.content;
62
- const { openExternalLinkInNewTab } = config.settings;
63
- return (
64
- <Container id="page-document">
65
- <h1 className="documentFirstHeading">{this.props.content.title}</h1>
66
- {this.props.content.description && (
67
- <p className="documentDescription">
68
- {this.props.content.description}
69
- </p>
70
- )}
71
- {remoteUrl && (
72
- <p>
73
- <FormattedMessage
74
- id="The link address is:"
75
- defaultMessage="The link address is:"
76
- />{' '}
77
- <UniversalLink
78
- href={remoteUrl}
79
- openLinkInNewTab={
80
- openExternalLinkInNewTab && !isInternalURL(remoteUrl)
81
- }
82
- >
83
- {flattenToAppURL(remoteUrl)}
84
- </UniversalLink>
85
- </p>
86
- )}
87
- </Container>
88
- );
89
- }
90
- }
62
+ LinkView.defaultProps = {
63
+ content: null,
64
+ token: null,
65
+ };
91
66
 
92
67
  export default LinkView;
@@ -5,8 +5,9 @@
5
5
 
6
6
  import React from 'react';
7
7
  import PropTypes from 'prop-types';
8
- import { Segment, Container } from 'semantic-ui-react';
8
+ import { Segment, Container as SemanticContainer } from 'semantic-ui-react';
9
9
  import { UniversalLink, PreviewImage } from '@plone/volto/components';
10
+ import config from '@plone/volto/registry';
10
11
 
11
12
  /**
12
13
  * List view component class.
@@ -14,32 +15,37 @@ import { UniversalLink, PreviewImage } from '@plone/volto/components';
14
15
  * @params {object} content Content object.
15
16
  * @returns {string} Markup of the component.
16
17
  */
17
- const ListingView = ({ content }) => (
18
- <Container id="page-home">
19
- <section id="content-core">
20
- {content.items.map((item) => (
21
- <Segment key={item.url} className="listing-item">
22
- <Container>
23
- <h2>
24
- <UniversalLink item={item} title={item['@type']}>
25
- {item.title}
26
- </UniversalLink>
27
- </h2>
28
- {item.description && <p>{item.description}</p>}
29
- </Container>
30
- {item.image_field && (
31
- <PreviewImage
32
- item={item}
33
- size="thumb"
34
- alt={item.image_caption ? item.image_caption : item.title}
35
- className="ui image"
36
- />
37
- )}
38
- </Segment>
39
- ))}
40
- </section>
41
- </Container>
42
- );
18
+ const ListingView = ({ content }) => {
19
+ const Container =
20
+ config.getComponent({ name: 'Container' }).component || SemanticContainer;
21
+
22
+ return (
23
+ <Container id="page-home">
24
+ <section id="content-core">
25
+ {content.items.map((item) => (
26
+ <Segment key={item.url} className="listing-item">
27
+ <Container>
28
+ <h2>
29
+ <UniversalLink item={item} title={item['@type']}>
30
+ {item.title}
31
+ </UniversalLink>
32
+ </h2>
33
+ {item.description && <p>{item.description}</p>}
34
+ </Container>
35
+ {item.image_field && (
36
+ <PreviewImage
37
+ item={item}
38
+ size="thumb"
39
+ alt={item.image_caption ? item.image_caption : item.title}
40
+ className="ui image"
41
+ />
42
+ )}
43
+ </Segment>
44
+ ))}
45
+ </section>
46
+ </Container>
47
+ );
48
+ };
43
49
 
44
50
  /**
45
51
  * Property types.
@@ -6,9 +6,10 @@
6
6
  import React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import { UniversalLink } from '@plone/volto/components';
9
- import { Container } from 'semantic-ui-react';
9
+ import { Container as SemanticContainer } from 'semantic-ui-react';
10
10
  import { FormattedMessage } from 'react-intl';
11
11
  import PreviewImage from '../PreviewImage/PreviewImage';
12
+ import config from '@plone/volto/registry';
12
13
 
13
14
  /**
14
15
  * Summary view component class.
@@ -16,43 +17,51 @@ import PreviewImage from '../PreviewImage/PreviewImage';
16
17
  * @param {Object} content Content object.
17
18
  * @returns {string} Markup of the component.
18
19
  */
19
- const SummaryView = ({ content }) => (
20
- <Container className="view-wrapper summary-view">
21
- <article id="content">
22
- <header>
23
- <h1 className="documentFirstHeading">{content.title}</h1>
24
- {content.description && (
25
- <p className="documentDescription">{content.description}</p>
26
- )}
27
- </header>
28
- <section id="content-core">
29
- {content.items.map((item) => (
30
- <article key={item.url}>
31
- <h2>
32
- <UniversalLink item={item} title={item['@type']}>
33
- {item.title}
34
- </UniversalLink>
35
- </h2>
36
- {item.image_field && (
37
- <PreviewImage
38
- item={item}
39
- alt={item.image_caption ? item.image_caption : item.title}
40
- size="thumb"
41
- className="ui image floated right clear"
42
- />
43
- )}
44
- {item.description && <p>{item.description}</p>}
45
- <p>
46
- <UniversalLink item={item}>
47
- <FormattedMessage id="Read More…" defaultMessage="Read More…" />
48
- </UniversalLink>
49
- </p>
50
- </article>
51
- ))}
52
- </section>
53
- </article>
54
- </Container>
55
- );
20
+ const SummaryView = ({ content }) => {
21
+ const Container =
22
+ config.getComponent({ name: 'Container' }).component || SemanticContainer;
23
+
24
+ return (
25
+ <Container className="view-wrapper summary-view">
26
+ <article id="content">
27
+ <header>
28
+ <h1 className="documentFirstHeading">{content.title}</h1>
29
+ {content.description && (
30
+ <p className="documentDescription">{content.description}</p>
31
+ )}
32
+ </header>
33
+ <section id="content-core">
34
+ {content.items.map((item) => (
35
+ <article key={item.url}>
36
+ <h2>
37
+ <UniversalLink item={item} title={item['@type']}>
38
+ {item.title}
39
+ </UniversalLink>
40
+ </h2>
41
+ {item.image_field && (
42
+ <PreviewImage
43
+ item={item}
44
+ alt={item.image_caption ? item.image_caption : item.title}
45
+ size="thumb"
46
+ className="ui image floated right clear"
47
+ />
48
+ )}
49
+ {item.description && <p>{item.description}</p>}
50
+ <p>
51
+ <UniversalLink item={item}>
52
+ <FormattedMessage
53
+ id="Read More…"
54
+ defaultMessage="Read More…"
55
+ />
56
+ </UniversalLink>
57
+ </p>
58
+ </article>
59
+ ))}
60
+ </section>
61
+ </article>
62
+ </Container>
63
+ );
64
+ };
56
65
 
57
66
  /**
58
67
  * Property types.
@@ -6,8 +6,9 @@
6
6
  import React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import { UniversalLink } from '@plone/volto/components';
9
- import { Container, Table } from 'semantic-ui-react';
9
+ import { Container as SemanticContainer, Table } from 'semantic-ui-react';
10
10
  import { FormattedMessage } from 'react-intl';
11
+ import config from '@plone/volto/registry';
11
12
 
12
13
  /**
13
14
  * Tabular view component class.
@@ -15,59 +16,64 @@ import { FormattedMessage } from 'react-intl';
15
16
  * @param {Object} content Content object.
16
17
  * @returns {string} Markup of the component.
17
18
  */
18
- const TabularView = ({ content }) => (
19
- <Container className="view-wrapper">
20
- <article id="content">
21
- <header>
22
- <h1 className="documentFirstHeading">{content.title}</h1>
23
- {content.description && (
24
- <p className="documentDescription">{content.description}</p>
25
- )}
26
- </header>
27
- <section id="content-core">
28
- <Table celled padded>
29
- <Table.Header>
30
- <Table.Row>
31
- <Table.HeaderCell>
32
- <FormattedMessage id="Title" defaultMessage="Title" />
33
- </Table.HeaderCell>
34
- <Table.HeaderCell>
35
- <FormattedMessage
36
- id="Description"
37
- defaultMessage="Description"
38
- />
39
- </Table.HeaderCell>
40
- <Table.HeaderCell>
41
- <FormattedMessage id="Type" defaultMessage="Type" />
42
- </Table.HeaderCell>
43
- <Table.HeaderCell>
44
- <FormattedMessage id="State" defaultMessage="State" />
45
- </Table.HeaderCell>
46
- </Table.Row>
47
- </Table.Header>
48
- <Table.Body>
49
- {content.items.map((item) => (
50
- <Table.Row key={item.url}>
51
- <Table.Cell>
52
- <UniversalLink
53
- item={item}
54
- className="summary url"
55
- title={item['@type']}
56
- >
57
- {item.title}
58
- </UniversalLink>
59
- </Table.Cell>
60
- <Table.Cell>{item.description}</Table.Cell>
61
- <Table.Cell>{item['@type']}</Table.Cell>
62
- <Table.Cell>{item.review_state}</Table.Cell>
19
+ const TabularView = ({ content }) => {
20
+ const Container =
21
+ config.getComponent({ name: 'Container' }).component || SemanticContainer;
22
+
23
+ return (
24
+ <Container className="view-wrapper">
25
+ <article id="content">
26
+ <header>
27
+ <h1 className="documentFirstHeading">{content.title}</h1>
28
+ {content.description && (
29
+ <p className="documentDescription">{content.description}</p>
30
+ )}
31
+ </header>
32
+ <section id="content-core">
33
+ <Table celled padded>
34
+ <Table.Header>
35
+ <Table.Row>
36
+ <Table.HeaderCell>
37
+ <FormattedMessage id="Title" defaultMessage="Title" />
38
+ </Table.HeaderCell>
39
+ <Table.HeaderCell>
40
+ <FormattedMessage
41
+ id="Description"
42
+ defaultMessage="Description"
43
+ />
44
+ </Table.HeaderCell>
45
+ <Table.HeaderCell>
46
+ <FormattedMessage id="Type" defaultMessage="Type" />
47
+ </Table.HeaderCell>
48
+ <Table.HeaderCell>
49
+ <FormattedMessage id="State" defaultMessage="State" />
50
+ </Table.HeaderCell>
63
51
  </Table.Row>
64
- ))}
65
- </Table.Body>
66
- </Table>
67
- </section>
68
- </article>
69
- </Container>
70
- );
52
+ </Table.Header>
53
+ <Table.Body>
54
+ {content.items.map((item) => (
55
+ <Table.Row key={item.url}>
56
+ <Table.Cell>
57
+ <UniversalLink
58
+ item={item}
59
+ className="summary url"
60
+ title={item['@type']}
61
+ >
62
+ {item.title}
63
+ </UniversalLink>
64
+ </Table.Cell>
65
+ <Table.Cell>{item.description}</Table.Cell>
66
+ <Table.Cell>{item['@type']}</Table.Cell>
67
+ <Table.Cell>{item.review_state}</Table.Cell>
68
+ </Table.Row>
69
+ ))}
70
+ </Table.Body>
71
+ </Table>
72
+ </section>
73
+ </article>
74
+ </Container>
75
+ );
76
+ };
71
77
 
72
78
  /**
73
79
  * Property types.
@@ -0,0 +1,11 @@
1
+ //useClient hook to replace repetitive delcaration in the components
2
+ import { useEffect, useState } from 'react';
3
+
4
+ export function useClient() {
5
+ const [isClient, setisClient] = useState(false);
6
+ useEffect(() => {
7
+ setisClient(true);
8
+ }, []);
9
+
10
+ return isClient;
11
+ }
@@ -1,2 +1,2 @@
1
1
  export useClipboard from '@plone/volto/hooks/clipboard/useClipboard';
2
- export useToken from '@plone/volto/hooks/userSession/useToken';
2
+ export { useClient } from '@plone/volto/hooks/client/useClient';
@@ -25,7 +25,7 @@ body {
25
25
  &.has-toolbar-menu-open,
26
26
  &.has-mobile-menu-open {
27
27
  // The body scroll locker when the toolbar or the mobile menu are active in mobile.
28
- @media only screen and (max-width: @largestMobileScreen) {
28
+ @media only screen and (max-width: @largestTabletScreen) {
29
29
  overflow: hidden;
30
30
  }
31
31
  }
@@ -667,5 +667,6 @@ body.has-toolbar-collapsed .mobile-menu {
667
667
  @import 'login';
668
668
  @import 'language-selector';
669
669
  @import 'views';
670
+ @import 'toc';
670
671
  @import 'grid.less';
671
672
  .loadUIOverrides();
@@ -0,0 +1,29 @@
1
+ .table-of-contents.horizontalMenu.sticky-toc {
2
+ position: sticky;
3
+ z-index: 1;
4
+ top: 0;
5
+ }
6
+
7
+ .table-of-contents.horizontalMenu .hidden {
8
+ z-index: -1;
9
+ pointer-events: none;
10
+ visibility: hidden;
11
+ }
12
+
13
+ .table-of-contents.horizontalMenu .hidden-dropdown {
14
+ display: none !important;
15
+ }
16
+
17
+ .table-of-contents.horizontalMenu .item.dropdown {
18
+ position: absolute !important;
19
+ right: 0;
20
+ }
21
+
22
+ .table-of-contents.horizontalMenu > .ui.menu {
23
+ position: relative;
24
+ }
25
+
26
+ .table-of-contents.horizontalMenu .item.dropdown .focused > a {
27
+ border: 2px solid black !important;
28
+ border-radius: 4px;
29
+ }
@@ -1,31 +0,0 @@
1
- import { useSelector, shallowEqual } from 'react-redux';
2
-
3
- /**
4
- * useContent hook
5
- *
6
- * This hook returns the current content that is stored in the Redux store in the
7
- * `content` reducer, and returns it along with the related state (loading/loaded/error).
8
- *
9
- * @export
10
- * @return {{ data: ContentData, loading: boolean, loaded: boolean, error: Error }}
11
- */
12
- export function useContent() {
13
- const data = useSelector((state) => state.content.data, shallowEqual);
14
- const loading = useSelector((state) => state.content.get.loading);
15
- const loaded = useSelector((state) => state.content.get.loaded);
16
- const error = useSelector((state) => state.content.get.error, shallowEqual);
17
-
18
- return { data, loading, loaded, error };
19
- }
20
-
21
- // For reference purposes: Potential future useQuery version
22
- // export function useContent() {
23
- // // the cache will need to know the current location
24
- // const pathname = useLocation();
25
- // const query = useQuery(getContentQuery({ path }))
26
-
27
- // // This might not be needed if we rename the properties
28
- // const {isLoading: loading, isSuccess: loaded, ...rest} = query;
29
-
30
- // return { loading, loaded, ...rest };
31
- // }
@@ -1,5 +0,0 @@
1
- import { useSelector, shallowEqual } from 'react-redux';
2
-
3
- export function useToken() {
4
- return useSelector((state) => state.userSession.token, shallowEqual);
5
- }