Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a339afc

Browse files
committedFeb 22, 2025·
feat: add chirpy to error page
1 parent 635d067 commit a339afc

File tree

4 files changed

+50
-40
lines changed

4 files changed

+50
-40
lines changed
 

‎public/images/chirpy.svg

+1
Loading

‎src/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const App = (): JSX.Element => {
3838
<DeviceSelector />
3939
<div className="flex grow flex-col">
4040
{device ? (
41-
<div className="flex h-screen">
41+
<div className="flex h-screen w-full">
4242
<DialogManager />
4343
<KeyBackupReminder />
4444
<CommandPalette />

‎src/components/UI/ErrorPage.tsx

+43-37
Original file line numberDiff line numberDiff line change
@@ -10,44 +10,50 @@ export function ErrorPage({ error }: { error: Error }) {
1010
}
1111

1212
return (
13-
<article>
13+
<article className="w-full">
1414
<section className="prose mx-auto mb-20 mt-28 max-w-prose px-8 text-2xl transition-all duration-150 ease-linear space-y-2">
15-
<Heading as="h2" className="text-text-primary">
16-
This is a little embarrassing...
17-
</Heading>
18-
<P>
19-
We are really sorry but an error occured in the web client that caused
20-
it to crash. This is not supposed to happen and we are working hard to
21-
fix it.
22-
</P>
23-
<P>
24-
The best way to prevent this from happening again to you or anyone
25-
else is to report the issue to us.
26-
</P>
27-
<P>Please include the following information in your report:</P>
28-
<ul className="list-disc list-inside text-sm">
29-
<li>What you were doing when the error occured</li>
30-
<li>What you expected to happen</li>
31-
<li>What actually happened</li>
32-
<li>Any other information you think might be relevant</li>
33-
</ul>
34-
<P>
35-
You can report the issue to our{" "}
36-
<Link
37-
href={newGithubIssueUrl({
38-
repoUrl: "https://github.com/meshtastic/web",
39-
template: "bug.yml",
40-
title: "[Bug]: An unhandled error occurred. <Add details here>",
41-
logs: error?.stack,
42-
})}
43-
>
44-
Github
45-
</Link>
46-
<ExternalLink size={24} className="inline-block ml-2" />
47-
</P>
48-
<P>
49-
Return to the <Link href="/">dashboard</Link>
50-
</P>
15+
<div className="grid grid-cols-1 md:grid-cols-2 gap-1 place-items-center">
16+
<div className="w-/12">
17+
<Heading as="h2" className="text-text-primary">
18+
This is a little embarrassing...
19+
</Heading>
20+
<P>
21+
We are really sorry but an error occured in the web client that
22+
caused it to crash. This is not supposed to happen and we are
23+
working hard to fix it.
24+
</P>
25+
<P>
26+
The best way to prevent this from happening again to you or anyone
27+
else is to report the issue to us.
28+
</P>
29+
<P>Please include the following information in your report:</P>
30+
<ul className="list-disc list-inside text-sm">
31+
<li>What you were doing when the error occured</li>
32+
<li>What you expected to happen</li>
33+
<li>What actually happened</li>
34+
<li>Any other information you think might be relevant</li>
35+
</ul>
36+
<P>
37+
You can report the issue to our{" "}
38+
<Link
39+
href={newGithubIssueUrl({
40+
repoUrl: "https://github.com/meshtastic/web",
41+
template: "bug.yml",
42+
title:
43+
"[Bug]: An unhandled error occurred. <Add details here>",
44+
logs: error?.stack,
45+
})}
46+
>
47+
Github
48+
</Link>
49+
<ExternalLink size={24} className="inline-block ml-2" />
50+
</P>
51+
<P>
52+
Return to the <Link href="/">dashboard</Link>
53+
</P>
54+
</div>
55+
<img src="/images/chirpy.svg" alt="Error" className="w-1/2" />
56+
</div>
5157

5258
<details className="mt-6 text-md">
5359
<summary className="cursor-pointer">Error Details</summary>

‎src/components/UI/Typography/P.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
import { cn } from "@app/core/utils/cn";
2+
13
export interface PProps {
24
children: React.ReactNode;
5+
className?: string;
36
}
47

5-
export const P = ({ children }: PProps) => (
6-
<p className="leading-7 not-first:mt-6">{children}</p>
8+
export const P = ({ children, className }: PProps) => (
9+
<p className={cn("leading-7 not-first:mt-6", className)}>{children}</p>
710
);

0 commit comments

Comments
 (0)
Please sign in to comment.