Skip to content

Commit

Permalink
NONE) fix: delete react-i18n in cds (#56)
Browse files Browse the repository at this point in the history
* fix: delete only tranlsation in cds

* fix: delete react-i18n package

* fix: delete optional in cancel label and delete useless
  • Loading branch information
dohui-son committed May 8, 2024
1 parent 6af5ad5 commit 667bc62
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 47 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"react-colorful": "^5.6.1",
"react-datepicker": "^4.25.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1",
"react-i18next": "^12.1.4"
"react-hot-toast": "^2.4.1"
},
"devDependencies": {
"@storybook/addon-designs": "^7.0.9",
Expand Down
41 changes: 1 addition & 40 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions src/components/Modal/Confirm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { useTranslation } from 'react-i18next';

import { MessageModal } from './MessageModal';
import { Button } from '..';

Expand All @@ -8,7 +6,7 @@ export interface ConfirmProps {
contents?: string;
opened: boolean;
cancel: {
label?: string;
label: string;
onClick: () => void;
};
confirm: {
Expand All @@ -18,15 +16,14 @@ export interface ConfirmProps {
}

export function Confirm({ title, contents, opened, cancel, confirm }: ConfirmProps) {
const { t } = useTranslation(['common']);
return (
<MessageModal
title={title}
contents={contents}
bottom={
<>
<Button onClick={cancel.onClick} variant="text" size="small">
{cancel.label || t('cancel')}
{cancel.label}
</Button>
<Button onClick={confirm.onClick} variant="filled" size="small">
{confirm.label}
Expand Down

0 comments on commit 667bc62

Please sign in to comment.