From b80a249cf7cd193e0d8d3761dd9db35aef9dd426 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 26 Jul 2021 22:40:01 +1200 Subject: [PATCH] Reduce code duplication in sorting radio options --- client/homebrew/pages/userPage/userPage.jsx | 88 ++++++--------------- 1 file changed, 22 insertions(+), 66 deletions(-) diff --git a/client/homebrew/pages/userPage/userPage.jsx b/client/homebrew/pages/userPage/userPage.jsx index 9dd72c2ca..b32e09f79 100644 --- a/client/homebrew/pages/userPage/userPage.jsx +++ b/client/homebrew/pages/userPage/userPage.jsx @@ -83,6 +83,22 @@ const UserPage = createClass({ }); }, + renderSortRadioOption : function(sortTitle, sortValue){ + return + + ; + }, + renderSortOptions : function(){ return
@@ -90,72 +106,12 @@ const UserPage = createClass({ - - - - - -
Sort Type :
- - - - - - - - - - + {this.renderSortRadioOption('Title', 'alpha')} + {this.renderSortRadioOption('Created Date', 'created')} + {this.renderSortRadioOption('Updated Date', 'updated')} + {this.renderSortRadioOption('Views', 'views')} + {/* {this.renderSortRadioOption('Latest', 'latest')} */} +
Direction :