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

Sort servers on browse page by their follower count, in descending order. #16

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/components/layout/frontPage/frontPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class FrontPage extends Component {
return (
<div className="front-page-container">
<div className="front-page-text">
<DisplayAlert show={true} />
<DisplayAlert show={false} />
<br />
<span>
Control & share robots online remotely in real time with remo.tv{" "}
Expand Down
14 changes: 4 additions & 10 deletions src/components/layout/robotServer/sortServers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,10 @@ const sortFollowed = (robotServers, followedServers) => {
};

export default sortServers;

// Sorted by followers, descending.
const compare = (a, b) => {
const serverA = a.created;
const serverB = b.created;
const serverA = a.status.count;
const serverB = b.status.count;

let comparison = 0;
if (serverA > serverB) {
comparison = 1;
} else if (serverA < serverB) {
comparison = -1;
}
return comparison * -1;
return serverB - serverA
};
2 changes: 0 additions & 2 deletions src/emotes/emotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import robotYay from "./imgs/robotYay.png";
import jill from "./imgs/jill.png";
import brooke from "./imgs/brooke.png";
import ged from "./imgs/gedyy.png";
import tgcfabian from "./imgs/tgcfabian.png";
import boland from "./imgs/boland.png";
import remoji from "./imgs/remo.png";
import peter from "./imgs/peter.png";
Expand All @@ -17,7 +16,6 @@ const emotes = {
jill: jill,
brooke: brooke,
ged: ged,
TGCFabian: tgcfabian,
Boland: boland,
remoji: remoji,
peter: peter,
Expand Down
Binary file removed src/emotes/imgs/tgcfabian.png
Binary file not shown.