From 55351978924ad563c71fd3d9a62e60bfc218935d Mon Sep 17 00:00:00 2001 From: Stefano Brilli Date: Thu, 2 Apr 2020 15:59:05 +0200 Subject: [PATCH] Show tracks sorted by index --- src/components/main.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/main.tsx b/src/components/main.tsx index 6ac7a9c..0aa2889 100644 --- a/src/components/main.tsx +++ b/src/components/main.tsx @@ -173,6 +173,7 @@ export const Main = (props: {}) => { } } } + tracks.sort((l, r) => l.index - r.index); // Action Handlers const handleSelectClick = (event: React.MouseEvent, item: number) => {