import type { ErrorComponentProps } from "@tanstack/solid-router"; import { currentLocale, formatApiError } from "@/api/client"; import { Button } from "@/components/ui/button"; import { IconAlert } from "@/components/ui/icons"; /** * The router's default error component: a page that throws while rendering * (typically a failed list read through `resource.latest`) shows this in * place of its own content, inside the shell, so navigation keeps working. * Without it the throw reached the app-wide boundary and replaced everything * with a full-screen 500. * * It can also render for the root route, above the i18n provider, so it uses * the client's bilingual-fallback idiom instead of `t(...)`. */ export function RouteErrorFallback(props: ErrorComponentProps) { const tr = () => currentLocale() === "tr"; console.error("Route render error:", props.error); return ( ); }