Skip to content

Commit

Permalink
[ Optimization ] : Update ordering by date
Browse files Browse the repository at this point in the history
Fixes #48
  • Loading branch information
moonlitgrace committed Apr 23, 2023
1 parent 2e4a91a commit cd5b2f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/pages/home/MainHero/LatestEpisodes.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import { latest_episodes } from '$data/mock/latest_episodes';
import { formatDate } from '$functions/formatDate';
import _ from 'lodash';
// icons
import SettingsOutline from '$icons/settings_outline.svelte';
Expand All @@ -9,8 +10,7 @@
import GradientCard from '$components/shared/GradientCard.svelte';
import Play from '$icons/play.svelte';
let sorted_latest_episodes = latest_episodes.sort((a, b) => Number(a.release_date) - Number(b.release_date)).reverse();
let sorted_latest_episodes = _.orderBy(latest_episodes, [(obj) => new Date(obj.release_date)], ['desc']);
</script>

<div class="w-[21.5625vw]">
Expand Down

2 comments on commit cd5b2f8

@vercel
Copy link

@vercel vercel bot commented on cd5b2f8 Apr 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

coreproject – ./

coreproject-suneethsunx.vercel.app
coreproject-git-master-suneethsunx.vercel.app
animecore.vercel.app

@vercel
Copy link

@vercel vercel bot commented on cd5b2f8 Apr 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.