]> Untitled Git - lemmy-ui.git/commitdiff
Add error message paragraph
authorabias <abias1122@gmail.com>
Mon, 22 May 2023 16:57:52 +0000 (12:57 -0400)
committerabias <abias1122@gmail.com>
Mon, 22 May 2023 16:57:52 +0000 (12:57 -0400)
src/shared/components/app/error-page.tsx

index 2a6c1a14d7597a1eb2489d2beb29a5c6102c44f8..e19323f94d3540d121608bad49951db462a30955 100644 (file)
@@ -22,16 +22,14 @@ export class ErrorPage extends Component<any, any> {
             ? i18n.t("error_page_title")
             : i18n.t("not_found_page_title")}
         </h1>
-        <p className="p-4">
-          {errorPageData ? (
-            <T i18nKey="error_page_paragraph" class="d-inline">
-              #<a href="https://lemmy.ml/c/lemmy_support">#</a>#
-              <a href="https://matrix.to/#/#lemmy-space:matrix.org">#</a>#
-            </T>
-          ) : (
-            i18n.t("not_found_page_message")
-          )}
-        </p>
+        {errorPageData ? (
+          <T i18nKey="error_page_paragraph" className="p-4" parent="p">
+            #<a href="https://lemmy.ml/c/lemmy_support">#</a>#
+            <a href="https://matrix.to/#/#lemmy-space:matrix.org">#</a>#
+          </T>
+        ) : (
+          <p>{i18n.t("not_found_page_message")}</p>
+        )}
         {!errorPageData && (
           <Link to="/" replace>
             {i18n.t("not_found_return_home_button")}
@@ -57,7 +55,13 @@ export class ErrorPage extends Component<any, any> {
             </>
           )}
         {errorPageData?.error && (
-          <strong className="d-block">Error Code: {errorPageData.error}</strong>
+          <T
+            i18nKey="error_code_message"
+            parent="p"
+            interpolation={{ error: errorPageData.error }}
+          >
+            #<strong className="text-danger">#</strong>#
+          </T>
         )}
       </div>
     );