Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orderby consistency #420

Merged
merged 2 commits into from
Sep 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/page/home/sidebar/SidebarLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import {View} from 'react-native';
import _ from 'underscore';
import PropTypes from 'prop-types';
import orderBy from 'lodash.orderby';
import lodashOrderby from 'lodash.orderby';
import styles from '../../../style/StyleSheet';
import Text from '../../../components/Text';
import SidebarLink from './SidebarLink';
Expand Down Expand Up @@ -58,7 +58,7 @@ class SidebarLinks extends React.Component {
render() {
const {reports, onLinkClick} = this.props;
const reportIDInUrl = parseInt(this.props.match.params.reportID, 10);
const sortedReports = orderBy(this.props.reports, ['pinnedReport', 'reportName'], ['desc', 'asc']);
const sortedReports = lodashOrderby(this.props.reports, ['pinnedReport', 'reportName'], ['desc', 'asc']);

// Filter the reports so that the only reports shown are pinned, unread, and the one matching the URL
// eslint-disable-next-line max-len
Expand Down