Skip to content

Commit 5cd3829

Browse files
committed
refactor: Clean up
1 parent e9129f4 commit 5cd3829

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

app/components/footer.tsx

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import {
2+
Footer as SwissFederalCiFooter,
23
FooterSection,
34
FooterSectionButton,
45
FooterSectionSocialMediaButton,
56
FooterSectionSocialMediaButtonGroup,
67
FooterSectionText,
78
FooterSectionTitle,
8-
Footer as SwissFederalCiFooter,
99
} from "@interactivethings/swiss-federal-ci/dist/components";
1010
import { t } from "@lingui/macro";
1111
import { Link, SxProps } from "@mui/material";
@@ -17,14 +17,20 @@ import { useLocale } from "@/locales/use-locale";
1717
const mkVersionLink = () => {
1818
let commitLink = "";
1919
let href = "";
20-
if (BUILD_GITHUB_REPO && BUILD_COMMIT) {
21-
commitLink = BUILD_COMMIT.substr(0, 7);
22-
href = `${BUILD_GITHUB_REPO}/commit/${BUILD_COMMIT}`;
23-
}
20+
2421
if (BUILD_COMMIT) {
2522
commitLink = `(${BUILD_COMMIT.substr(0, 7)})`;
2623
}
27-
return { title: `${BUILD_VERSION} ${commitLink}`, href, external: true };
24+
25+
if (BUILD_GITHUB_REPO) {
26+
href = `${BUILD_GITHUB_REPO}/commit/${BUILD_COMMIT}`;
27+
}
28+
29+
return {
30+
title: `${BUILD_VERSION} ${commitLink}`,
31+
href,
32+
external: true,
33+
};
2834
};
2935

3036
export const Footer = ({ sx }: { sx?: SxProps }) => {

0 commit comments

Comments
 (0)