Convert SlashCommandHelpDialog to TS
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
1f670e225c
commit
444a0da297
1 changed files with 7 additions and 3 deletions
|
@ -17,11 +17,13 @@ limitations under the License.
|
|||
import React from 'react';
|
||||
import { _t } from "../../../languageHandler";
|
||||
import { CommandCategories, Commands } from "../../../SlashCommands";
|
||||
import * as sdk from "../../../index";
|
||||
import InfoDialog from "./InfoDialog";
|
||||
|
||||
export default ({ onFinished }) => {
|
||||
const InfoDialog = sdk.getComponent('dialogs.InfoDialog');
|
||||
interface IProps {
|
||||
onFinished: () => void;
|
||||
}
|
||||
|
||||
const SlashCommandHelpDialog: React.FC<IProps> = ({ onFinished }) => {
|
||||
const categories = {};
|
||||
Commands.forEach(cmd => {
|
||||
if (!cmd.isEnabled()) return;
|
||||
|
@ -62,3 +64,5 @@ export default ({ onFinished }) => {
|
|||
hasCloseButton={true}
|
||||
onFinished={onFinished} />;
|
||||
};
|
||||
|
||||
export default SlashCommandHelpDialog;
|
Loading…
Reference in a new issue