mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-12 19:33:41 +08:00
feat: i18n support
This commit is contained in:
@@ -63,9 +63,9 @@ const EditRedemption = () => {
|
||||
const { success, message, data } = res.data;
|
||||
if (success) {
|
||||
if (isEdit) {
|
||||
showSuccess('兑换码更新成功!');
|
||||
showSuccess(t('redemption.messages.update_success'));
|
||||
} else {
|
||||
showSuccess('兑换码创建成功!');
|
||||
showSuccess(t('redemption.messages.create_success'));
|
||||
setInputs(originInputs);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
import React from 'react';
|
||||
import { Card } from 'semantic-ui-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import RedemptionsTable from '../../components/RedemptionsTable';
|
||||
|
||||
const Redemption = () => (
|
||||
<div className='dashboard-container'>
|
||||
<Card fluid className='chart-card'>
|
||||
<Card.Content>
|
||||
<Card.Header className='header'>兑换管理</Card.Header>
|
||||
<RedemptionsTable />
|
||||
</Card.Content>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
const Redemption = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<div className='dashboard-container'>
|
||||
<Card fluid className='chart-card'>
|
||||
<Card.Content>
|
||||
<Card.Header className='header'>{t('redemption.title')}</Card.Header>
|
||||
<RedemptionsTable />
|
||||
</Card.Content>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Redemption;
|
||||
|
||||
Reference in New Issue
Block a user