From 3ec949bdc5d61fb14ea94dd9b8a81da046ba50ea Mon Sep 17 00:00:00 2001 From: alikia2x Date: Mon, 1 Dec 2025 20:53:13 +0800 Subject: [PATCH] update: showing 'go home' button on all error pages --- .../.wrangler/tmp/deploy-41aj6n/no-op-worker.js | 15 +++++++++++++++ .../tmp/deploy-41aj6n/no-op-worker.js.map | 8 ++++++++ packages/temp_frontend/app/components/Error.tsx | 8 +++----- 3 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 packages/temp_frontend/.wrangler/tmp/deploy-41aj6n/no-op-worker.js create mode 100644 packages/temp_frontend/.wrangler/tmp/deploy-41aj6n/no-op-worker.js.map diff --git a/packages/temp_frontend/.wrangler/tmp/deploy-41aj6n/no-op-worker.js b/packages/temp_frontend/.wrangler/tmp/deploy-41aj6n/no-op-worker.js new file mode 100644 index 0000000..2713ee4 --- /dev/null +++ b/packages/temp_frontend/.wrangler/tmp/deploy-41aj6n/no-op-worker.js @@ -0,0 +1,15 @@ +// ../../node_modules/.bun/wrangler@4.46.0/node_modules/wrangler/templates/no-op-worker.js +var no_op_worker_default = { + fetch() { + return new Response("Not found", { + status: 404, + headers: { + "Content-Type": "text/html" + } + }); + } +}; +export { + no_op_worker_default as default +}; +//# sourceMappingURL=no-op-worker.js.map diff --git a/packages/temp_frontend/.wrangler/tmp/deploy-41aj6n/no-op-worker.js.map b/packages/temp_frontend/.wrangler/tmp/deploy-41aj6n/no-op-worker.js.map new file mode 100644 index 0000000..edb9e6a --- /dev/null +++ b/packages/temp_frontend/.wrangler/tmp/deploy-41aj6n/no-op-worker.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "sources": ["../../../../../node_modules/.bun/wrangler@4.46.0/node_modules/wrangler/templates/no-op-worker.js"], + "sourceRoot": "/Users/alikia/Code/cvsa/packages/temp_frontend/.wrangler/tmp/deploy-41aj6n", + "sourcesContent": ["export default {\n\tfetch() {\n\t\treturn new Response(\"Not found\", {\n\t\t\tstatus: 404,\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"text/html\",\n\t\t\t},\n\t\t});\n\t},\n};\n"], + "mappings": ";AAAA,IAAO,uBAAQ;AAAA,EACd,QAAQ;AACP,WAAO,IAAI,SAAS,aAAa;AAAA,MAChC,QAAQ;AAAA,MACR,SAAS;AAAA,QACR,gBAAgB;AAAA,MACjB;AAAA,IACD,CAAC;AAAA,EACF;AACD;", + "names": [] +} diff --git a/packages/temp_frontend/app/components/Error.tsx b/packages/temp_frontend/app/components/Error.tsx index a0133b0..57d8520 100644 --- a/packages/temp_frontend/app/components/Error.tsx +++ b/packages/temp_frontend/app/components/Error.tsx @@ -16,11 +16,9 @@ export function Error({ error }: { error: { status: number; value: { message?: s {error.value.message && (

{error.value.message}

)} - {error.status === 404 && ( - - 返回首页 - - )} + + 返回首页 + );