Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

Commit 589071f

Browse files
committed
fix: fixing lighthouse issues
1 parent 893f085 commit 589071f

File tree

9 files changed

+57
-24
lines changed

9 files changed

+57
-24
lines changed

public/noise.webp

-169 KB
Binary file not shown.

src/app/api/page.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function Component() {
2727
Retrieve all messages for a specific email address
2828
</p>
2929
<div className="mt-2 space-y-2">
30-
<h3 className="text-primary text-md font-semibold">Endpoint</h3>
30+
<h2 className="text-primary text-md font-semibold">Endpoint</h2>
3131
<section className="flex items-center gap-2">
3232
<div className="bg-primary/5 rounded p-2 flex-grow min-w-0">
3333
<code className="text-sm block truncate">
@@ -40,11 +40,11 @@ export default function Component() {
4040
className="flex-shrink-0"
4141
/>
4242
</section>
43-
<h3 className="text-primary text-md font-semibold">Parameters</h3>
43+
<h2 className="text-primary text-md font-semibold">Parameters</h2>
4444
<ul className="list-disc list-inside text-sm text-foreground/80">
4545
<li>email (string): The email address to fetch messages for</li>
4646
</ul>
47-
<h3 className="text-primary text-md font-semibold">Response</h3>
47+
<h2 className="text-primary text-md font-semibold">Response</h2>
4848
<div className="bg-primary/5 rounded p-2 overflow-x-auto">
4949
<pre className="text-sm text-foreground/80">
5050
{`[
@@ -82,7 +82,7 @@ export default function Component() {
8282
Retrieve a specific message by its ID
8383
</p>
8484
<div className="mt-2 space-y-2">
85-
<h3 className="text-primary text-md font-semibold">Endpoint</h3>
85+
<h2 className="text-primary text-md font-semibold">Endpoint</h2>
8686
<section className="flex items-center gap-2">
8787
<div className="bg-primary/5 rounded p-2 flex-grow min-w-0">
8888
<code className="text-sm block truncate">
@@ -95,11 +95,11 @@ export default function Component() {
9595
className="flex-shrink-0"
9696
/>
9797
</section>
98-
<h3 className="text-primary text-md font-semibold">Parameters</h3>
98+
<h2 className="text-primary text-md font-semibold">Parameters</h2>
9999
<ul className="list-disc list-inside text-sm text-foreground/80">
100100
<li>inboxId (string): The unique identifier of the message</li>
101101
</ul>
102-
<h3 className="text-primary text-md font-semibold">Response</h3>
102+
<h2 className="text-primary text-md font-semibold">Response</h2>
103103
<div className="bg-primary/5 rounded p-2 overflow-x-auto">
104104
<pre className="text-sm text-foreground/80">
105105
{`{
@@ -135,7 +135,7 @@ export default function Component() {
135135
Delete a specific message by its ID
136136
</p>
137137
<div className="mt-2 space-y-2">
138-
<h3 className="text-primary text-md font-semibold">Endpoint</h3>
138+
<h2 className="text-primary text-md font-semibold">Endpoint</h2>
139139
<section className="flex items-center gap-2">
140140
<div className="bg-primary/5 rounded p-2 flex-grow min-w-0">
141141
<code className="text-sm block truncate">
@@ -148,11 +148,11 @@ export default function Component() {
148148
className="flex-shrink-0"
149149
/>
150150
</section>
151-
<h3 className="text-primary text-md font-semibold">Parameters</h3>
151+
<h2 className="text-primary text-md font-semibold">Parameters</h2>
152152
<ul className="list-disc list-inside text-sm text-foreground/80">
153153
<li>inboxId (string): The unique identifier of the message</li>
154154
</ul>
155-
<h3 className="text-primary text-md font-semibold">Response</h3>
155+
<h2 className="text-primary text-md font-semibold">Response</h2>
156156
<div className="bg-primary/5 rounded p-2 overflow-x-auto">
157157
<pre className="text-sm text-foreground/80">true</pre>
158158
</div>

src/app/globals.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114
40% {
115115
transform: translate(-15%, -20%);
116116
}
117-
118117
50% {
119118
transform: translate(-5%, -10%);
120119
}

src/app/inbox/[inboxId]/page.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ export default async function InboxPage({ params }: InboxProps) {
6868
</div>
6969
</section>
7070
<Link href={`/delete/${inboxId}`} className="w-full">
71-
<Button className="text-background w-full">
71+
<Button
72+
className="text-background w-full"
73+
type="button"
74+
aria-label="Delete Email"
75+
>
7276
Delete Email <Trash2Icon />
7377
</Button>
7478
</Link>

src/app/layout.tsx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import "./globals.css";
22

33
import Link from "next/link";
4-
import { Lexend } from "next/font/google";
4+
import Head from "next/head";
55
import Image from "next/image";
66
import type { Metadata } from "next";
77

88
import NextTopLoader from "nextjs-toploader";
99
import { Button } from "@/components/ui/button";
1010

11+
import { Lexend } from "next/font/google";
12+
1113
const font = Lexend({
1214
subsets: ["latin"],
1315
display: "swap",
@@ -18,7 +20,7 @@ const font = Lexend({
1820

1921
export const metadata: Metadata = {
2022
title: "VWH Email",
21-
description: "Temp mail service, anonymously and free.",
23+
description: "Open source temp mail service, anonymous and free",
2224
};
2325

2426
export default function RootLayout({
@@ -28,11 +30,20 @@ export default function RootLayout({
2830
}>) {
2931
return (
3032
<html lang="en">
33+
<Head>
34+
<link rel="preload" as="image" href="/noise.webp" type="image/webp" />
35+
</Head>
3136
<body className={`${font.className} antialiased`}>
3237
<NextTopLoader showSpinner={false} color="#909DA8" />
3338
<NoiseWrapper>
3439
<Link href="/api/" className="absolute top-4 right-4">
35-
<Button variant="outline" size="sm" className="text-sm">
40+
<Button
41+
variant="outline"
42+
size="sm"
43+
className="text-sm"
44+
type="button"
45+
aria-label="API"
46+
>
3647
API
3748
</Button>
3849
</Link>
@@ -44,18 +55,19 @@ export default function RootLayout({
4455
draggable={false}
4556
src="/logo.webp"
4657
className="h-28 w-28"
47-
width={100}
48-
height={100}
58+
width={112}
59+
height={112}
4960
alt="Logo"
5061
title="Logo"
62+
priority
5163
/>
5264
</Link>
5365
<main className="flex w-full max-w-5xl flex-col gap-2">
5466
{children}
5567
</main>
5668
<footer className="text-primary flex flex-col text-center">
5769
<span className="sm:text-md text-sm">
58-
Temp mail service, anonymously and free.
70+
Temp mail service, anonymous and free
5971
</span>
6072
<a
6173
target="_blank"

src/app/not-found.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ export default function NotFound() {
88
<ErrorAlert title="Oops! Page Not Found">
99
<div className="flex items-center justify-center gap-2">
1010
<Link href="/" className="text-sm text-foreground/80">
11-
<Button variant="outline">Go Back to Home</Button>
11+
<Button variant="outline" type="button" aria-label="Go Back To Home">
12+
Go Back To Home
13+
</Button>
1214
</Link>
1315
</div>
1416
</ErrorAlert>

src/app/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ export default function Home() {
2020
<section className="flex w-full flex-col justify-between gap-6 sm:flex-row sm:gap-12">
2121
<div className="flex items-start space-x-4">
2222
<div>
23-
<h3 className="text-primary text-lg font-semibold">
23+
<h2 className="text-primary text-lg font-semibold">
2424
Use any inbox to avoid spam
25-
</h3>
25+
</h2>
2626
<p className="text-foreground/80">
2727
Use it when you don{"'"}t want to get spammed by revealing your
2828
real email address.
@@ -31,9 +31,9 @@ export default function Home() {
3131
</div>
3232
<div className="flex items-start space-x-4">
3333
<div>
34-
<h3 className="text-primary text-lg font-semibold">
34+
<h2 className="text-primary text-lg font-semibold">
3535
Email Auto-Deletes
36-
</h3>
36+
</h2>
3737
<p className="text-foreground/80">
3838
Emails are in the public domain, and auto delete after three
3939
days.

src/components/client/copy-button.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ export default function CopyButton({
3333
size="icon"
3434
className={`h-10 w-10 ${className}`}
3535
onClick={copyToClipboard}
36+
type="button"
37+
aria-label="Copy To Clipboard"
38+
title="Copy To Clipboard"
3639
>
3740
{copied ? (
3841
<CopyCheckIcon className="h-4 w-4" />

src/components/client/home-input.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,26 @@ export default function HomeInput({ emailValue }: HomeInputProps) {
3636
className="flex-grow"
3737
type="email"
3838
/>
39-
<Button onClick={regenerateEmail} size="icon" variant="outline">
39+
<Button
40+
onClick={regenerateEmail}
41+
size="icon"
42+
variant="outline"
43+
type="button"
44+
aria-label="Regenerate Email"
45+
title="Regenerate Email"
46+
>
4047
<RefreshCwIcon className="h-4 w-4" />
4148
</Button>
4249
<CopyButton text={email} />
4350
</div>
4451
<Link href={`/${email}`}>
45-
<Button className="mt-2 w-full text-background">Get Mail Now!</Button>
52+
<Button
53+
className="mt-2 w-full text-background"
54+
type="button"
55+
aria-label="Get Mail Now"
56+
>
57+
Get Mail Now!
58+
</Button>
4659
</Link>
4760
</section>
4861
);

0 commit comments

Comments
 (0)