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:
Atridad Lahiji 2023-11-27 11:51:10 -07:00 committed by GitHub
commit bf5668d27f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 23 deletions

View file

@ -1,12 +1,16 @@
import { Link } from "@remix-run/react";
import { Link, isRouteErrorResponse, useRouteError } from "@remix-run/react";
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 (
<span className="text-center">
<h1 className="text-5xl font-bold m-2">404</h1>
<h1 className="text-5xl font-bold m-2">
Oops! This room does not appear to exist, or may have been deleted! 😢
</h1>
<h1 className="text-5xl font-bold m-2">{message}</h1>
<h2 className="text-2xl font-bold m-2">
If you believe you reached this page in error, please file an issue{" "}
<a

View file

@ -45,7 +45,8 @@ export const loader: LoaderFunction = async (args) => {
if (!room) {
throw new Response(null, {
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) {
throw new Response(null, {
status: 404,
statusText: "Not Found",
statusText:
"Wowee zowee! This wasn't supposed to happen! Maybe try refreshing the page... 🤔🧐",
});
}

View file

@ -1,10 +1,5 @@
import { SignIn } from "@clerk/remix";
export default function SignInPage() {
return (
<div>
<h1>Sign In route</h1>
<SignIn />
</div>
);
return <SignIn />;
}

View file

@ -1,10 +1,5 @@
import { SignUp } from "@clerk/remix";
export default function SignUpPage() {
return (
<div>
<h1>Sign Up route</h1>
<SignUp />
</div>
);
return <SignUp />;
}

View file

@ -1,6 +1,6 @@
{
"name": "sprintpadawan",
"version": "4.0.2",
"version": "4.0.3",
"private": true,
"sideEffects": false,
"type": "module",

8
pnpm-lock.yaml generated
View file

@ -1916,7 +1916,7 @@ packages:
tar-fs: 2.1.1
tsconfig-paths: 4.2.0
typescript: 5.3.2
undici: 5.28.0
undici: 5.28.1
ws: 7.5.9
transitivePeerDependencies:
- '@types/node'
@ -5957,7 +5957,7 @@ packages:
glob-to-regexp: 0.4.1
source-map-support: 0.5.21
stoppable: 1.1.0
undici: 5.28.0
undici: 5.28.1
workerd: 1.20231030.0
ws: 8.14.2
youch: 3.3.3
@ -7875,8 +7875,8 @@ packages:
/undici-types@5.26.5:
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
/undici@5.28.0:
resolution: {integrity: sha512-gM12DkXhlAc5+/TPe60iy9P6ETgVfqTuRJ6aQ4w8RYu0MqKuXhaq3/b86GfzDQnNA3NUO6aUNdvevrKH59D0Nw==}
/undici@5.28.1:
resolution: {integrity: sha512-xcIIvj1LOQH9zAL54iWFkuDEaIVEjLrru7qRpa3GrEEHk6OBhb/LycuUY2m7VCcTuDeLziXCxobQVyKExyGeIA==}
engines: {node: '>=14.0'}
dependencies:
'@fastify/busboy': 2.1.0