diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/AppList.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/AppList.js index 1f2350de59..5667cf3b9b 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/AppList.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/components/apps/AppList.js @@ -18,7 +18,7 @@ import React from "react"; import AppCard from "./AppCard"; -import {Col, Row, Result, Pagination} from "antd"; +import {Col, Row, Result} from "antd"; import axios from "axios"; import {withConfigContext} from "../../context/ConfigContext"; import {handleApiError} from "../../js/Utils"; @@ -89,7 +89,6 @@ class AppList extends React.Component { } }).catch((error) => { - console.log(error); handleApiError(error, "Error occurred while trying to load apps.", true); if (error.hasOwnProperty("response") && error.response.status === 403) { const {forbiddenErrors} = this.state; @@ -106,10 +105,6 @@ class AppList extends React.Component { }); }; - handlePaginationChange = (page, pageSize) => { - this.fetchData(page, pageSize); - }; - handleInfiniteOnLoad = (count) => { const offset = count * limit; let apps = this.state.apps; @@ -134,7 +129,7 @@ class AppList extends React.Component { }; render() { - const {apps, loading, forbiddenErrors, totalAppCount, hasMore} = this.state; + const {apps, loading, forbiddenErrors, hasMore} = this.state; return (
@@ -144,31 +139,29 @@ class AppList extends React.Component { loadMore={this.handleInfiniteOnLoad} hasMore={!loading && hasMore} useWindow={true}> - - {(forbiddenErrors.apps) && ( - Back Home} - /> - )} - {!((forbiddenErrors.apps)) && apps.length === 0 && ( - Back Home} + + {(forbiddenErrors.apps) && ( + + )} + {!(forbiddenErrors.apps) && apps.length === 0 && ( + + )} + {apps.map(app => ( + + - )} - {apps.map(app => ( - - - - ))} - + + ))} +
);