peppa/apps/web/components/Footer.tsx
Асель 1b0f6063cb Merge main into task/pep-98: PEP-94/97/100/101/102 texts through the dictionary
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:11:59 +05:00

29 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { loadEnv } from "@peppa/shared";
import { intlLocale } from "@peppa/shared/i18n";
import { getT } from "@/lib/i18n";
/** Build stamp: which Peppa version and commit is running. */
export async function Footer() {
const t = await getT();
const version = process.env.NEXT_PUBLIC_PEPPA_VERSION;
const commit = process.env.NEXT_PUBLIC_PEPPA_COMMIT;
const full = process.env.NEXT_PUBLIC_PEPPA_COMMIT_FULL;
const date = process.env.NEXT_PUBLIC_PEPPA_COMMIT_DATE;
const dirty = process.env.NEXT_PUBLIC_PEPPA_DIRTY;
return (
<footer className="px-4 py-6 text-center text-xs text-muted-foreground">
Peppa FACTORY v{version}
{commit && (
<>
{" · "}
<a href={`${loadEnv().GITEA_URL}/${loadEnv().GITEA_PLATFORM_REPO}/commit/${full}`} className="font-mono text-primary">
{commit}
</a>
{dirty && <span title={t("Собрано с незакоммиченными изменениями")}> {t("+изменения")}</span>}
</>
)}
{date && ` · ${new Date(date).toLocaleDateString(intlLocale(t.locale))}`}
</footer>
);
}