mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-09-11 00:22:56 -05:00
Merge pull request #334 from S33G/i18n/unexpected-error
Make unexpected error localizable
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
@@ -254,6 +254,10 @@ const en = {
|
||||
updateBtn: 'Change',
|
||||
logoutBtn: 'Logout'
|
||||
}
|
||||
},
|
||||
error: {
|
||||
title: 'We\'ve ran into an issue',
|
||||
refresh: 'Refresh',
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user