feat: add translation

This commit is contained in:
JimmFly
2023-01-04 17:10:47 +08:00
parent 1bc2dcd661
commit 0b61f4a2a0
16 changed files with 118 additions and 90 deletions
+3 -1
View File
@@ -7,6 +7,7 @@ import {
StyledModalWrapper,
} from '@/ui/confirm/styles';
import { Button } from '@/ui/button';
import { useTranslation } from 'react-i18next';
export type ConfirmProps = {
title?: string;
content?: string;
@@ -26,6 +27,7 @@ export const Confirm = ({
onCancel,
}: ConfirmProps) => {
const [open, setOpen] = useState(true);
const { t } = useTranslation();
return (
<Modal open={open}>
<StyledModalWrapper>
@@ -48,7 +50,7 @@ export const Confirm = ({
}}
style={{ marginRight: '24px' }}
>
Cancel
{t('Cancel')}
</Button>
<Button
type={confirmType}