From cb8cbb4ed082d4175d135e276a4c3237708c672f Mon Sep 17 00:00:00 2001 From: Cesar Varela Date: Tue, 9 Apr 2024 17:48:03 -0300 Subject: [PATCH] Make sure commit sha is rendered in the last column --- .../src/components/layout/Footer.js | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/site/gatsby-site/src/components/layout/Footer.js b/site/gatsby-site/src/components/layout/Footer.js index 399676148e..983882a2fb 100644 --- a/site/gatsby-site/src/components/layout/Footer.js +++ b/site/gatsby-site/src/components/layout/Footer.js @@ -12,6 +12,14 @@ import config from '../../../config'; import { LocalizedLink } from 'plugins/gatsby-theme-i18n'; import { Trans, useTranslation } from 'react-i18next'; +function CommitSHA() { + return ( +
+ {process.env.GATSBY_COMMIT_SHA.toString().substring(0, 7)} +
+ ); +} + export default function Footer() { const data = useStaticQuery(graphql` query FooterQuery { @@ -204,13 +212,13 @@ export default function Footer() { )} - {i == footerContent.length - 1 && process.env.GATSBY_COMMIT_SHA && ( -
  • -
    - {process.env.GATSBY_COMMIT_SHA.toString().substring(0, 7)} -
    -
  • - )} + {i == footerContent.length - 1 && + allPrismicFooter.edges.length > 0 && + process.env.GATSBY_COMMIT_SHA && ( +
  • + +
  • + )} ); @@ -298,6 +306,7 @@ export default function Footer() { /> + )}