From bbd257e6501e903e5cbb721934969fe3cae15041 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Wed, 23 Mar 2022 10:17:07 +0100 Subject: [PATCH] Layout snippet fix --- .../components/SnippetsView/Snippets.tsx | 100 +++++++++--------- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/src/dashboardWebView/components/SnippetsView/Snippets.tsx b/src/dashboardWebView/components/SnippetsView/Snippets.tsx index 2815198c..448871fe 100644 --- a/src/dashboardWebView/components/SnippetsView/Snippets.tsx +++ b/src/dashboardWebView/components/SnippetsView/Snippets.tsx @@ -76,58 +76,60 @@ export const Snippets: React.FunctionComponent = (props: React.P )}> - { - viewData?.data?.filePath && ( -
-

Select the snippet to add to your content.

-
- ) - } - - { - snippetKeys && snippetKeys.length > 0 ? ( - - ) : ( -
-
- -

No snippets found

+
+ { + viewData?.data?.filePath && ( +
+

Select the snippet to add to your content.

-
- ) - } + ) + } - { - showCreateDialog && ( - + { + snippetKeys && snippetKeys.length > 0 ? ( +
    + { + snippetKeys.map((snippetKey: any, index: number) => ( + + )) + } +
+ ) : ( +
+
+ +

No snippets found

+
+
+ ) + } - setSnippetTitle(value)} - onDescriptionUpdate={(value: string) => setSnippetDescription(value)} - onBodyUpdate={(value: string) => setSnippetBody(value)} /> - -
- ) - } + { + showCreateDialog && ( + + + setSnippetTitle(value)} + onDescriptionUpdate={(value: string) => setSnippetDescription(value)} + onBodyUpdate={(value: string) => setSnippetBody(value)} /> + + + ) + } +