mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-01 01:29:31 +08:00
feat: add translation
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user