mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
Add reload button to failed to load profile
This commit is contained in:
parent
4bf7698f64
commit
e7c3dd072e
2 changed files with 9 additions and 0 deletions
|
@ -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": {
|
||||
|
|
|
@ -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: {
|
|||
</Button>
|
||||
</div>
|
||||
) : null}
|
||||
{props.showReloadButton ? (
|
||||
<div className="mt-6">
|
||||
<Button theme="secondary" onClick={() => window.location.reload()}>
|
||||
{t("screens.loadingUserError.reload")}
|
||||
</Button>
|
||||
</div>
|
||||
) : null}
|
||||
</LargeTextPart>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue