From 444a0da2973a44e33d186e4fcfed432d6de90a26 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0imon=20Brandner?= <simon.bra.ag@gmail.com>
Date: Sun, 5 Sep 2021 11:58:38 +0200
Subject: [PATCH] Convert SlashCommandHelpDialog to TS
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
---
 ...CommandHelpDialog.js => SlashCommandHelpDialog.tsx} | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
 rename src/components/views/dialogs/{SlashCommandHelpDialog.js => SlashCommandHelpDialog.tsx} (90%)

diff --git a/src/components/views/dialogs/SlashCommandHelpDialog.js b/src/components/views/dialogs/SlashCommandHelpDialog.tsx
similarity index 90%
rename from src/components/views/dialogs/SlashCommandHelpDialog.js
rename to src/components/views/dialogs/SlashCommandHelpDialog.tsx
index d21ccbe47f..c47555567e 100644
--- a/src/components/views/dialogs/SlashCommandHelpDialog.js
+++ b/src/components/views/dialogs/SlashCommandHelpDialog.tsx
@@ -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;