ConusAI vendor v0.1.0-dev.20261027+9b1131fb
ci / gate (push) Waiting to run

This commit is contained in:
ConusAI vendor v0.1.0-dev.20261027+9b1131fb
2026-10-27 18:05:17 +00:00
commit 3102273ec7
538 changed files with 80203 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
"use client"
// The last boundary: the root layout itself threw, so there is no document, no stylesheet and no
// provider of strings -- this file renders its own <html> and carries its own two languages, chosen
// from the browser's. The server has already logged the error; this reports the browser's side.
import { useEffect } from "react"
import { reportClientError } from "../src/observe/browser"
const STRINGS = {
en: { title: "Something went wrong", body: "The app could not be shown. Try again.", retry: "Try again" },
lt: {
title: "Kažkas nepavyko",
body: "Programos parodyti nepavyko. Bandykite dar kartą.",
retry: "Bandyti dar kartą",
},
} as const
export default function GlobalError({ error, retry }: { error: Error & { digest?: string }; retry: () => void }) {
useEffect(() => {
reportClientError(error)
}, [error])
const locale = typeof navigator !== "undefined" && navigator.language.toLowerCase().startsWith("lt") ? "lt" : "en"
const strings = STRINGS[locale]
return (
<html lang={locale}>
<body>
<main>
<h1>{strings.title}</h1>
<p role="alert">{strings.body}</p>
<button type="button" onClick={retry}>
{strings.retry}
</button>
</main>
</body>
</html>
)
}