1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Table } from 'react-bootstrap';
4 import { useTranslation } from 'react-i18next';
6 import Command from './Command';
13 const { t } = useTranslation();
15 return channel.chat_commands ?
19 <th>{t('twitchBot.commandName')}</th>
20 <th>{t('twitchBot.commandRestriction')}</th>
21 <th>{t('twitchBot.commandType')}</th>
22 <th className="text-end">{t('general.actions')}</th>
26 {Object.entries(channel.chat_commands).map(([name, settings]) =>
30 onEditCommand={onEditCommand}
31 onRemoveCommand={onRemoveCommand}
40 Commands.propTypes = {
41 channel: PropTypes.shape({
42 chat_commands: PropTypes.shape({
45 onEditCommand: PropTypes.func,
46 onRemoveCommand: PropTypes.func,
49 export default Commands;