Skip to content

Commit 02ca40f

Browse files
fix(examples): remove dep on crypto (#779)
1 parent 7038966 commit 02ca40f

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

examples/basic/app/routes/demos/actions.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { useEffect, useRef } from "react";
22
import type { ActionFunction } from "remix";
33
import { Form, json, useActionData, redirect } from "remix";
44

5-
import { hash } from "~/utils.server";
6-
75
export function meta() {
86
return { title: "Actions Demo" };
97
}
@@ -23,15 +21,7 @@ export let action: ActionFunction = async ({ request }) => {
2321
return json("Come on, at least try!", { status: 400 });
2422
}
2523

26-
let rightAnswers = [
27-
"4fa6024f12494d3a99d8bda9b7a55f7d140f328a",
28-
"ce3659ad235ca6d1e12dec21465aff3f9a62bb8c",
29-
"bd111dcb4b343de4ec0a79d2d5ec55a3919c79c4"
30-
];
31-
32-
let encrypted = hash(answer);
33-
34-
if (!rightAnswers.includes(encrypted)) {
24+
if (answer !== "egg") {
3525
return json(`Sorry, ${answer} is not right.`, { status: 400 });
3626
}
3727

examples/basic/app/utils.server.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)