Make unexpected error localizable

This commit is contained in:
s33g
2025-02-20 00:08:18 +00:00
parent b35542a446
commit fbf2531dbb
2 changed files with 7 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
import { Button } from 'antd';
import { t } from 'i18next';
export const MainError = () => {
return (
@@ -7,10 +8,10 @@ export const MainError = () => {
role="alert"
>
<h2 className="text-lg font-semibold text-red-500">
Sorry, there seems to be some problems :(
{t('error.title')}
</h2>
<Button type="primary" danger onClick={() => window.location.assign(window.location.origin)}>
Refresh
{t('error.refresh')}
</Button>
</div>
);

View File

@@ -254,6 +254,10 @@ const en = {
updateBtn: 'Change',
logoutBtn: 'Logout'
}
},
error: {
title: 'We\'ve ran into an issue',
refresh: 'Refresh',
}
}
};