From 1c19388d103d27b5567c06f6904a35fb3eec19a6 Mon Sep 17 00:00:00 2001 From: Prajith Date: Tue, 16 Apr 2019 19:09:30 +0530 Subject: [PATCH] sort services based on last updated time. --- client/components/service-list/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/components/service-list/index.js b/client/components/service-list/index.js index a7d9045..c6414dc 100644 --- a/client/components/service-list/index.js +++ b/client/components/service-list/index.js @@ -8,7 +8,10 @@ import styles from './index.css'; export default class ServiceList extends Component { render() { - const services = this.matchingServices(); + const services = this.matchingServices().sort((a,b) => { + return new Date(a.deployments[0].updatedAt).getTime() - + new Date(b.deployments[0].updatedAt).getTime() + }).reverse(); return (