Skip to content

Commit

Permalink
fix: do not show subsite footer banner when field is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
deodorhunter committed Oct 10, 2023
1 parent 98031d5 commit 1a1f7b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
### Fix

- Uniformato e impostato a sinistra l'allineamento del testo nel blocco Elenco nella variazione Quadratoni con immagine
- Non mostrare la fascia colorata del footer di un sottosito quando questo non è compilato

## Versione 8.7.3 (26/09/2023)

Expand Down
4 changes: 2 additions & 2 deletions src/components/ItaliaTheme/Footer/SubsiteFooter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import React from 'react';
import { useSelector } from 'react-redux';
import { useLocation } from 'react-router-dom';
import { flattenHTMLToAppURL, isCmsUi } from '@plone/volto/helpers';
import { richTextHasContent } from 'design-comuni-plone-theme/components/ItaliaTheme/View';

const SubsiteFooter = () => {
const location = useLocation();
const isCmsUI = isCmsUi(location.pathname);
const subsite = useSelector((state) => state.subsite?.data);

return subsite?.subsite_footer?.data ? (
return richTextHasContent(subsite?.subsite_footer) ? (
<div className={`subsite-footer ${isCmsUI ? 'public-ui' : ''}`}>
<div className="text">
<div className="container px-md-4">
Expand Down

0 comments on commit 1a1f7b1

Please sign in to comment.