import React from 'react'; import PropTypes from 'prop-types'; import { useTranslation } from 'react-i18next'; import { toastSuccess } from '../../../util/apiNotification'; const AccessTokenSettings = (props) => { const { t } = useTranslation('admin'); const discardTokenHandler = () => { if (props.discardTokenHandler) { props.discardTokenHandler(); } }; const generateTokenHandler = () => { if (props.generateTokenHandler) { props.generateTokenHandler(); } }; const textboxClickHandler = (e) => { e.target.select(); if (props.accessToken) { navigator.clipboard.writeText(props.accessToken) .then(() => { toastSuccess(t('slack_integration.copied_to_clipboard')) }); } }; return (