From e7c3dd072e680aebc0c13032ec761dae7bfdb1b0 Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Sat, 16 Mar 2024 00:40:41 -0400 Subject: [PATCH] Add reload button to failed to load profile --- src/assets/locales/en.json | 1 + src/index.tsx | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index 14ca4b09..c765342f 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -458,6 +458,7 @@ "logout": "Logout", "reset": "Reset custom server", "text": "Failed to load your profile", + "reload": "Reload", "textWithReset": "Failed to load your profile from your custom server, want to reset back to the default server?" }, "migration": { diff --git a/src/index.tsx b/src/index.tsx index d5fffaae..608f3f11 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -54,6 +54,7 @@ function ErrorScreen(props: { children: ReactNode; showResetButton?: boolean; showLogoutButton?: boolean; + showReloadButton?: boolean; }) { const { t } = useTranslation(); const { logout } = useAuth(); @@ -91,6 +92,13 @@ function ErrorScreen(props: { ) : null} + {props.showReloadButton ? ( +
+ +
+ ) : null} ); }