Merge pull request #65 from atridadl/dev
4.0.3 🚧 Cleaned up error handling 🚧 Removed useless dependencies 🚧 Updated existing dependencies
This commit is contained in:
commit
bf5668d27f
6 changed files with 19 additions and 23 deletions
|
@ -1,12 +1,16 @@
|
||||||
import { Link } from "@remix-run/react";
|
import { Link, isRouteErrorResponse, useRouteError } from "@remix-run/react";
|
||||||
|
|
||||||
export default function FourOhFour() {
|
export default function FourOhFour() {
|
||||||
|
const error = useRouteError();
|
||||||
|
let message =
|
||||||
|
"Oops! This room does not appear to exist, or may have been deleted! 😢";
|
||||||
|
if (isRouteErrorResponse(error)) {
|
||||||
|
message = error.statusText;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<span className="text-center">
|
<span className="text-center">
|
||||||
<h1 className="text-5xl font-bold m-2">4️⃣0️⃣4️⃣</h1>
|
<h1 className="text-5xl font-bold m-2">4️⃣0️⃣4️⃣</h1>
|
||||||
<h1 className="text-5xl font-bold m-2">
|
<h1 className="text-5xl font-bold m-2">{message}</h1>
|
||||||
Oops! This room does not appear to exist, or may have been deleted! 😢
|
|
||||||
</h1>
|
|
||||||
<h2 className="text-2xl font-bold m-2">
|
<h2 className="text-2xl font-bold m-2">
|
||||||
If you believe you reached this page in error, please file an issue{" "}
|
If you believe you reached this page in error, please file an issue{" "}
|
||||||
<a
|
<a
|
||||||
|
|
|
@ -45,7 +45,8 @@ export const loader: LoaderFunction = async (args) => {
|
||||||
if (!room) {
|
if (!room) {
|
||||||
throw new Response(null, {
|
throw new Response(null, {
|
||||||
status: 404,
|
status: 404,
|
||||||
statusText: "Not Found",
|
statusText:
|
||||||
|
"Oops! This room does not appear to exist, or may have been deleted! 😢",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +62,8 @@ export const loader: LoaderFunction = async (args) => {
|
||||||
if (isShit) {
|
if (isShit) {
|
||||||
throw new Response(null, {
|
throw new Response(null, {
|
||||||
status: 404,
|
status: 404,
|
||||||
statusText: "Not Found",
|
statusText:
|
||||||
|
"Wowee zowee! This wasn't supposed to happen! Maybe try refreshing the page... 🤔🧐",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
import { SignIn } from "@clerk/remix";
|
import { SignIn } from "@clerk/remix";
|
||||||
|
|
||||||
export default function SignInPage() {
|
export default function SignInPage() {
|
||||||
return (
|
return <SignIn />;
|
||||||
<div>
|
|
||||||
<h1>Sign In route</h1>
|
|
||||||
<SignIn />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
import { SignUp } from "@clerk/remix";
|
import { SignUp } from "@clerk/remix";
|
||||||
|
|
||||||
export default function SignUpPage() {
|
export default function SignUpPage() {
|
||||||
return (
|
return <SignUp />;
|
||||||
<div>
|
|
||||||
<h1>Sign Up route</h1>
|
|
||||||
<SignUp />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sprintpadawan",
|
"name": "sprintpadawan",
|
||||||
"version": "4.0.2",
|
"version": "4.0.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
|
@ -1916,7 +1916,7 @@ packages:
|
||||||
tar-fs: 2.1.1
|
tar-fs: 2.1.1
|
||||||
tsconfig-paths: 4.2.0
|
tsconfig-paths: 4.2.0
|
||||||
typescript: 5.3.2
|
typescript: 5.3.2
|
||||||
undici: 5.28.0
|
undici: 5.28.1
|
||||||
ws: 7.5.9
|
ws: 7.5.9
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@types/node'
|
- '@types/node'
|
||||||
|
@ -5957,7 +5957,7 @@ packages:
|
||||||
glob-to-regexp: 0.4.1
|
glob-to-regexp: 0.4.1
|
||||||
source-map-support: 0.5.21
|
source-map-support: 0.5.21
|
||||||
stoppable: 1.1.0
|
stoppable: 1.1.0
|
||||||
undici: 5.28.0
|
undici: 5.28.1
|
||||||
workerd: 1.20231030.0
|
workerd: 1.20231030.0
|
||||||
ws: 8.14.2
|
ws: 8.14.2
|
||||||
youch: 3.3.3
|
youch: 3.3.3
|
||||||
|
@ -7875,8 +7875,8 @@ packages:
|
||||||
/undici-types@5.26.5:
|
/undici-types@5.26.5:
|
||||||
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
||||||
|
|
||||||
/undici@5.28.0:
|
/undici@5.28.1:
|
||||||
resolution: {integrity: sha512-gM12DkXhlAc5+/TPe60iy9P6ETgVfqTuRJ6aQ4w8RYu0MqKuXhaq3/b86GfzDQnNA3NUO6aUNdvevrKH59D0Nw==}
|
resolution: {integrity: sha512-xcIIvj1LOQH9zAL54iWFkuDEaIVEjLrru7qRpa3GrEEHk6OBhb/LycuUY2m7VCcTuDeLziXCxobQVyKExyGeIA==}
|
||||||
engines: {node: '>=14.0'}
|
engines: {node: '>=14.0'}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@fastify/busboy': 2.1.0
|
'@fastify/busboy': 2.1.0
|
||||||
|
|
Loading…
Add table
Reference in a new issue