Skip to content

Commit

Permalink
Change the order of the videos to reverse order(I think people want t… (
Browse files Browse the repository at this point in the history
#502)

* Change the order of the videos to reverse order(I think people want to see the newest video more)

* fix 503 (When a video file missing a comma other videos can not display)
  • Loading branch information
1109471432 authored Nov 2, 2022
1 parent 626c032 commit 4f0b04d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/components/Videos/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import BeatLoader from "react-spinners/BeatLoader";

const Videos = ({ videos = [], query = "" }) => {
const preloadVal = videos.length > 100 ? "none" : "auto";
const filtered = videos.filter(fname => fname.includes(query));
const filtered = videos.filter((fname) => fname.includes(query) && fname.includes(".")).reverse();

return (
<StyledVideos>
<TransitionGroup className={`videos__list`}>
{filtered.length &&
filtered.map(fname => {
filtered.map((fname) => {
const src = `/video/${fname}`;
const session = fname.match(/.*(?=\.)/)[0];

Expand Down

0 comments on commit 4f0b04d

Please sign in to comment.