-
- ),
- title: "Create Application",
- }}
- />
+
+
- {this.props.applicationList ? (
-
- {this.props.applicationList.map(this.renderApplicationCard)}
-
- ) : (
-
- )}
+ ,
+ title: "Create New App",
+ formName: CREATE_APPLICATION_FORM_NAME,
+ formSubmitIntent: "primary",
+ isAdding:
+ this.props.isCreatingApplication ||
+ !!this.props.createApplicationError,
+ errorAdding: this.props.createApplicationError,
+ }}
+ search={{
+ placeholder: "Search",
+ }}
+ />
+
+
+ {applicationList.map((application: ApplicationPayload) => (
+
+ ))}
+
-
+
);
}
}
@@ -176,6 +107,7 @@ const mapStateToProps = (state: AppState) => ({
applicationList: getApplicationList(state),
isFetchingApplications: getIsFetchingApplications(state),
isCreatingApplication: getIsCreatingApplication(state),
+ createApplicationError: getCreateApplicationError(state),
});
const mapDispatchToProps = (dispatch: any) => ({
@@ -192,8 +124,5 @@ const mapDispatchToProps = (dispatch: any) => ({
});
export default withRouter(
- connect(
- mapStateToProps,
- mapDispatchToProps,
- )(Applications),
+ connect(mapStateToProps, mapDispatchToProps)(Applications),
);
diff --git a/app/client/src/pages/common/SubHeader.tsx b/app/client/src/pages/common/SubHeader.tsx
new file mode 100644
index 0000000000..86c223f922
--- /dev/null
+++ b/app/client/src/pages/common/SubHeader.tsx
@@ -0,0 +1,92 @@
+import React, { ReactNode, useState, useEffect } from "react";
+import FormDialogComponent from "components/designSystems/blueprint/FormDialogComponent";
+import {
+ ControlGroup,
+ InputGroup,
+ Button,
+ IIconProps,
+} from "@blueprintjs/core";
+import styled from "styled-components";
+
+const SubHeaderWrapper = styled.div`
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ padding: 0 ${props => props.theme.spaces[5]}px;
+`;
+const StyledAddButton = styled(Button)