diff --git a/apps/webapp/package.json b/apps/webapp/package.json index 9988412c2a..51e66277f7 100644 --- a/apps/webapp/package.json +++ b/apps/webapp/package.json @@ -18,6 +18,7 @@ "@radix-ui/react-icons": "^1.3.0", "@tanstack/react-query": "^5.24.1", "bignumber.js": "^9.1.2", + "date-fns": "^3.3.1", "immer": "^10.0.3", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/apps/webapp/src/components/footer/index.tsx b/apps/webapp/src/components/footer/index.tsx new file mode 100644 index 0000000000..29f336c50a --- /dev/null +++ b/apps/webapp/src/components/footer/index.tsx @@ -0,0 +1,26 @@ +import { format } from 'date-fns'; + +export const Footer = () => { + const shortenedCommitHash = __COMMIT_HASH__.slice(0, 7); + const dateObj = new Date(__COMMIT_DATE__); + const formattedDate = format(dateObj, "MMM dd yyyy HH:mm:ss 'GMT'x"); + + return ( +
+
+
Frontend app version
+
+ + {shortenedCommitHash} + {' '} + - {formattedDate} +
+
+
+ ); +}; diff --git a/apps/webapp/src/components/layout.tsx b/apps/webapp/src/components/layout.tsx index c706e9980d..38ded5c7bc 100644 --- a/apps/webapp/src/components/layout.tsx +++ b/apps/webapp/src/components/layout.tsx @@ -6,6 +6,7 @@ import '@penumbra-zone/ui/styles/globals.css'; import { isExtensionInstalled } from '../utils/is-connected'; import { getChainId } from '../fetchers/chain-id'; import { ExtensionNotInstalled } from './extension-not-installed'; +import { Footer } from './footer'; export type LayoutLoaderResult = | { isInstalled: false } @@ -34,6 +35,7 @@ export const Layout = () => {
+