選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

LogoutDialog.tsx 952B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import React from 'react';
  2. import { WithTranslation } from 'react-i18next';
  3. import { translate } from '../../../base/i18n/functions';
  4. import { connect } from '../../../base/redux/functions';
  5. import Dialog from '../../../base/ui/components/web/Dialog';
  6. /**
  7. * The type of {@link LogoutDialog}'s React {@code Component} props.
  8. */
  9. interface IProps extends WithTranslation {
  10. /**
  11. * Logout handler.
  12. */
  13. onLogout: () => void;
  14. }
  15. /**
  16. * Implements the Logout dialog.
  17. *
  18. * @param {Object} props - The props of the component.
  19. * @returns {React$Element}.
  20. */
  21. function LogoutDialog({ onLogout, t }: IProps) {
  22. return (
  23. <Dialog
  24. ok = {{ translationKey: 'dialog.Yes' }}
  25. onSubmit = { onLogout }
  26. titleKey = { t('dialog.logoutTitle') }>
  27. <div>
  28. { t('dialog.logoutQuestion') }
  29. </div>
  30. </Dialog>
  31. );
  32. }
  33. export default translate(connect()(LogoutDialog));