1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-25 16:19:47 +02:00

ref: Creating popups with hook, fix translation keys passing

This commit is contained in:
Maksim Eltyshev 2023-01-24 18:53:13 +01:00
parent 6fd42e3b62
commit d975b2d07a
69 changed files with 309 additions and 332 deletions

View file

@ -2,15 +2,18 @@ import React from 'react';
import PropTypes from 'prop-types';
import { useTranslation } from 'react-i18next';
import { Button, Divider, Header, Tab } from 'semantic-ui-react';
import { usePopup } from '../../../lib/popup';
import InformationEdit from './InformationEdit';
import DeletePopup from '../../DeletePopup';
import DeleteStep from '../../DeleteStep';
import styles from './GeneralPane.module.scss';
const GeneralPane = React.memo(({ name, onUpdate, onDelete }) => {
const [t] = useTranslation();
const DeletePopup = usePopup(DeleteStep);
return (
<Tab.Pane attached={false} className={styles.wrapper}>
<InformationEdit
@ -28,11 +31,9 @@ const GeneralPane = React.memo(({ name, onUpdate, onDelete }) => {
</Divider>
<div className={styles.action}>
<DeletePopup
title={t('common.deleteProject', {
context: 'title',
})}
content={t('common.areYouSureYouWantToDeleteThisProject')}
buttonContent={t('action.deleteProject')}
title="common.deleteProject"
content="common.areYouSureYouWantToDeleteThisProject"
buttonContent="action.deleteProject"
onConfirm={onDelete}
>
<Button className={styles.actionButton}>