Skip to content

Commit

Permalink
feat: Flag to hide social links from footer
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinszuchet committed Oct 18, 2024
1 parent cd5702e commit 8a75278
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/components/Footer/Footer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ storiesOf('Footer', module)
<Footer isFullWidth />
</div>
))
.add('Without the social links', () => <Footer hideSocialLinks />)
34 changes: 19 additions & 15 deletions src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export type FooterProps = {
isFullscreen?: boolean
className?: string
isFullWidth?: boolean
hideSocialLinks?: boolean
}

export class Footer extends React.PureComponent<FooterProps> {
Expand Down Expand Up @@ -62,7 +63,8 @@ export class Footer extends React.PureComponent<FooterProps> {
i18n,
isFullscreen,
className,
isFullWidth
isFullWidth,
hideSocialLinks
} = this.props

let classes = 'dcl footer'
Expand Down Expand Up @@ -97,20 +99,22 @@ export class Footer extends React.PureComponent<FooterProps> {
</div>
</div>
<div className="secondary-footer">
<div className="social-links">
<a href="https://dcl.gg/discord">
<i className="social-icon discord" />
</a>
<a href="https://reddit.com/r/decentraland">
<i className="social-icon reddit" />
</a>
<a href="https://github.com/decentraland">
<i className="social-icon github" />
</a>
<a href="https://twitter.com/decentraland">
<i className="social-icon twitter" />
</a>
</div>
{!hideSocialLinks ? (
<div className="social-links">
<a href="https://dcl.gg/discord">
<i className="social-icon discord" />
</a>
<a href="https://reddit.com/r/decentraland">
<i className="social-icon reddit" />
</a>
<a href="https://github.com/decentraland">
<i className="social-icon github" />
</a>
<a href="https://twitter.com/decentraland">
<i className="social-icon twitter" />
</a>
</div>
) : null}
<div className="copyright">
© {new Date().getFullYear()} Decentraland
</div>
Expand Down

0 comments on commit 8a75278

Please sign in to comment.