remove-effect-var-confirm.tsx 663 B

1234567891011121314151617181920212223242526272829303132
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import { useTranslation } from 'react-i18next'
  5. import Confirm from '@/app/components/base/confirm'
  6. type Props = {
  7. isShow: boolean
  8. onConfirm: () => void
  9. onCancel: () => void
  10. }
  11. const i18nPrefix = 'workflow.common.effectVarConfirm'
  12. const RemoveVarConfirm: FC<Props> = ({
  13. isShow,
  14. onConfirm,
  15. onCancel,
  16. }) => {
  17. const { t } = useTranslation()
  18. return (
  19. <Confirm
  20. isShow={isShow}
  21. title={t(`${i18nPrefix}.title`)}
  22. content={t(`${i18nPrefix}.content`)}
  23. onConfirm={onConfirm}
  24. onCancel={onCancel}
  25. />
  26. )
  27. }
  28. export default React.memo(RemoveVarConfirm)