From 7330dad6f9a20be490cb53d223fc671b72b6cedf Mon Sep 17 00:00:00 2001 From: navaneeth Date: Thu, 27 May 2021 13:41:28 +0530 Subject: [PATCH] Standalone component for empty state of dashboard --- frontend/src/HomePage/BlankPage.jsx | 30 +++++++++++++++++++++++++++++ frontend/src/HomePage/HomePage.jsx | 26 ++++--------------------- 2 files changed, 34 insertions(+), 22 deletions(-) create mode 100644 frontend/src/HomePage/BlankPage.jsx diff --git a/frontend/src/HomePage/BlankPage.jsx b/frontend/src/HomePage/BlankPage.jsx new file mode 100644 index 0000000000..9ef29d53ce --- /dev/null +++ b/frontend/src/HomePage/BlankPage.jsx @@ -0,0 +1,30 @@ +import React from 'react'; + +export const BlankPage = function BlankPage({ + createApp +}) { + return (
+
+
+
+
+
+
+
+
+

You haven't created any apps yet.

+ +
+
+
+
+
) +} diff --git a/frontend/src/HomePage/HomePage.jsx b/frontend/src/HomePage/HomePage.jsx index d1ed40648e..e6c623541a 100644 --- a/frontend/src/HomePage/HomePage.jsx +++ b/frontend/src/HomePage/HomePage.jsx @@ -4,6 +4,7 @@ import { Link } from 'react-router-dom'; import { Pagination, Header } from '@/_components'; import { Folders } from './Folders'; import { AppMenu } from './AppMenu'; +import { BlankPage } from './BlankPage'; class HomePage extends React.Component { constructor(props) { @@ -84,28 +85,9 @@ class HomePage extends React.Component { /> {!isLoading && meta.total_count === 0 && -
-
-
-
-
-
-
-
-

You haven't created any apps yet.

- -
-
-
-
+ } {(isLoading || meta.total_count > 0) &&