diff --git a/apps/web/app/api/commit-hash/route.ts b/apps/web/app/api/commit-hash/route.ts new file mode 100644 index 0000000..8b4dce4 --- /dev/null +++ b/apps/web/app/api/commit-hash/route.ts @@ -0,0 +1,7 @@ +import { NextResponse } from "next/server"; +import { execSync } from "child_process"; + +export function GET() { + const hash = execSync("git rev-parse --short HEAD").toString().trim(); + return NextResponse.json({ hash }); +} \ No newline at end of file diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 54b43d0..b0182c6 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -1,6 +1,7 @@ import type { Metadata } from "next"; import type { ReactNode } from "react"; import "./globals.css"; +import { Footer } from "../components/footer"; export const metadata: Metadata = { title: "pien.studio", @@ -10,7 +11,10 @@ export const metadata: Metadata = { export default function RootLayout({ children }: { children: ReactNode }) { return ( -
{children} + + {children} + + ); } diff --git a/apps/web/components/footer.tsx b/apps/web/components/footer.tsx new file mode 100644 index 0000000..d8c96fa --- /dev/null +++ b/apps/web/components/footer.tsx @@ -0,0 +1,20 @@ +"use client"; + +import { useEffect, useState } from "react"; + +export function Footer() { + const [hash, setHash] = useState