Skip to content

Commit

Permalink
fix(frontend): bring back error layout
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisDa committed Jul 2, 2024
1 parent 5246e46 commit ff79e7e
Showing 1 changed file with 36 additions and 34 deletions.
70 changes: 36 additions & 34 deletions apps/frontend/app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { $path } from "@ignisda/remix-routes";
import {
ActionIcon,
Alert,
Expand All @@ -14,6 +15,7 @@ import {
type MetaFunction,
unstable_defineLoader,
} from "@remix-run/node";
import { Form } from "@remix-run/react";
import {
Links,
Meta,
Expand Down Expand Up @@ -161,37 +163,37 @@ export default function App() {
);
}

// export function ErrorBoundary() {
// return (
// <html lang="en">
// <head>
// <DefaultHeadTags />
// <Meta />
// <Links />
// </head>
// <body>
// <div>
// We encountered an error. If you recently upgraded the server, you may
// have to logout and login again. If the error still persists, please
// create a new issue on{" "}
// <a
// href="https://github.com/ignisda/ryot/issues"
// target="_blank"
// rel="noreferrer noopener"
// >
// GitHub
// </a>
// .
// </div>
// <Form
// replace
// method="POST"
// action={$path("/actions", { intent: "logout" })}
// >
// <button type="submit">Logout</button>
// </Form>
// <Scripts />
// </body>
// </html>
// );
// }
export function ErrorBoundary() {
return (
<html lang="en">
<head>
<DefaultHeadTags />
<Meta />
<Links />
</head>
<body>
<div>
We encountered an error. If you recently upgraded the server, you may
have to logout and login again. If the error still persists, please
create a new issue on{" "}
<a
href="https://github.com/ignisda/ryot/issues"
target="_blank"
rel="noreferrer noopener"
>
GitHub
</a>
.
</div>
<Form
replace
method="POST"
action={$path("/actions", { intent: "logout" })}
>
<button type="submit">Logout</button>
</Form>
<Scripts />
</body>
</html>
);
}

0 comments on commit ff79e7e

Please sign in to comment.