mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-23 23:41:52 +08:00
style: fmt code
This commit is contained in:
+11
-9
@@ -1,4 +1,9 @@
|
||||
import type { Route } from "./+types/root";
|
||||
|
||||
import { RootProvider } from "fumadocs-ui/provider/react-router";
|
||||
import { I18nextProvider } from "react-i18next";
|
||||
|
||||
import "./app.css";
|
||||
import {
|
||||
isRouteErrorResponse,
|
||||
Links,
|
||||
@@ -7,13 +12,12 @@ import {
|
||||
Scripts,
|
||||
ScrollRestoration,
|
||||
} from "react-router";
|
||||
import type { Route } from "./+types/root";
|
||||
import "./app.css";
|
||||
import { I18nextProvider } from "react-i18next";
|
||||
|
||||
import SearchDialog from "@/components/search";
|
||||
import { TailwindIndicator } from "@/components/tailwind-indicator";
|
||||
import { Toaster } from "@/components/ui/sonner";
|
||||
import { env } from "@/config";
|
||||
|
||||
import i18n from "./i18n/i18n";
|
||||
import { QueryProvider } from "./providers/query-client-provider";
|
||||
|
||||
@@ -39,7 +43,7 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
||||
<Meta />
|
||||
<Links />
|
||||
</head>
|
||||
<body className="flex flex-col min-h-screen">
|
||||
<body className="flex min-h-screen flex-col">
|
||||
<RootProvider search={{ SearchDialog }}>
|
||||
<Toaster />
|
||||
<QueryProvider>
|
||||
@@ -66,20 +70,18 @@ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
|
||||
if (isRouteErrorResponse(error)) {
|
||||
message = error.status === 404 ? "404" : "Error";
|
||||
details =
|
||||
error.status === 404
|
||||
? "The requested page could not be found."
|
||||
: error.statusText || details;
|
||||
error.status === 404 ? "The requested page could not be found." : error.statusText || details;
|
||||
} else if (import.meta.env.DEV && error && error instanceof Error) {
|
||||
details = error.message;
|
||||
stack = error.stack;
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="pt-16 p-4 container mx-auto">
|
||||
<main className="container mx-auto p-4 pt-16">
|
||||
<h1>{message}</h1>
|
||||
<p>{details}</p>
|
||||
{stack && (
|
||||
<pre className="w-full p-4 overflow-x-auto">
|
||||
<pre className="w-full overflow-x-auto p-4">
|
||||
<code>{stack}</code>
|
||||
</pre>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user