Skip to content

Commit

Permalink
Make sha shorter and place it in the last footer column
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarvarela committed Jan 23, 2024
1 parent c36732b commit 2a79ae0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions site/gatsby-site/src/components/layout/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default function Footer() {
id="main-footer"
className="bg-text-light-gray relative sm:grid sm:grid-cols-2 md:grid-cols-4 gap-5 p-5 z-50"
>
{footerContent.map((group) => {
{footerContent.map((group, i) => {
const title = group.title;

const items = group.items;
Expand Down Expand Up @@ -203,6 +203,14 @@ export default function Footer() {
})}
</div>
)}

{i == footerContent.length - 1 && process.env.GATSBY_COMMIT_SHA && (
<li>
<div className="text-muted-gray text-xs" data-cy="commit-sha">
{process.env.GATSBY_COMMIT_SHA.toString().substring(0, 7)}
</div>
</li>
)}
</ul>
</div>
);
Expand Down Expand Up @@ -292,12 +300,6 @@ export default function Footer() {
</div>
</div>
)}

{process.env.GATSBY_COMMIT_SHA && (
<div className="text-muted-gray text-xs" data-cy="commit-sha">
{process.env.GATSBY_COMMIT_SHA}
</div>
)}
</footer>
);
}

0 comments on commit 2a79ae0

Please sign in to comment.