From 7ec3b1edda0e9b5ddf049a51e831982504ec2825 Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Wed, 7 Jun 2023 18:31:59 +0200 Subject: [PATCH] Polish error page styling fix status mobile fix 404 text align --- .../src/client/components/error-boundary.tsx | 9 +++------ packages/next/src/pages/_error.tsx | 17 +++++++---------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/packages/next/src/client/components/error-boundary.tsx b/packages/next/src/client/components/error-boundary.tsx index bc83c846ff74..d785d5fc66a0 100644 --- a/packages/next/src/client/components/error-boundary.tsx +++ b/packages/next/src/client/components/error-boundary.tsx @@ -15,14 +15,11 @@ const styles = { alignItems: 'center', justifyContent: 'center', }, - desc: { - textAlign: 'left', - }, text: { fontSize: '14px', fontWeight: 400, - lineHeight: '3em', - margin: 0, + lineHeight: '28px', + margin: '0 8px', }, } as const @@ -108,7 +105,7 @@ export default function GlobalError({ error }: { error: any }) {
-
+

Application error: a client-side exception has occurred (see the browser console for more information). diff --git a/packages/next/src/pages/_error.tsx b/packages/next/src/pages/_error.tsx index ca57c82991eb..effc8b75d129 100644 --- a/packages/next/src/pages/_error.tsx +++ b/packages/next/src/pages/_error.tsx @@ -36,12 +36,9 @@ const styles: Record = { alignItems: 'center', justifyContent: 'center', }, - desc: { - display: 'inline-block', - textAlign: 'left', + lineHeight: '48px', }, - h1: { display: 'inline-block', margin: '0 20px 0 0', @@ -49,14 +46,14 @@ const styles: Record = { fontSize: 24, fontWeight: 500, verticalAlign: 'top', - lineHeight: '49px', }, - h2: { fontSize: 14, fontWeight: 400, - lineHeight: '49px', - margin: 0, + lineHeight: '28px', + }, + wrap: { + display: 'inline-block', }, } @@ -85,7 +82,7 @@ export default class Error

extends React.Component

{ : 'Application error: a client-side exception has occurred'} -

+