Skip to content

Commit

Permalink
fix(footer): Don't show empty row if description is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
kreafox committed Feb 24, 2023
1 parent e904aa0 commit 2ca7f7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/ui/Footer/Description.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Grid } from 'semantic-ui-react';

const Description = (props) => {
if (props.children) {
return <div>{props.children}</div>;
}

return props.description ? (
<div className="footer-description">
<p>{props.description}</p>
</div>
<Grid.Row>
<div className="footer-description">
<p>{props.description}</p>
</div>
</Grid.Row>
) : null;
};

Expand Down
4 changes: 1 addition & 3 deletions src/ui/Footer/SubFooter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ const SubFooter = (props) => {
</Grid.Column>
</Grid>

<Grid.Row>
<Footer.Description description={props.description} />
</Grid.Row>
<Footer.Description description={props.description} />

<Grid.Row>
<Footer.Social social={props.social} />
Expand Down

0 comments on commit 2ca7f7d

Please sign in to comment.