From c2ffcddc6eb98711556cea357c8935521a107f7b Mon Sep 17 00:00:00 2001 From: Factiven Date: Thu, 13 Apr 2023 22:25:07 +0700 Subject: Update index.js --- pages/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/index.js b/pages/index.js index 6c0ccb8..6740949 100644 --- a/pages/index.js +++ b/pages/index.js @@ -113,7 +113,7 @@ export default function Home({ detail, populars }) { if (!session) return; const res = await fetch(`/api/get-user?userName=${session?.user.name}`); const data = await res.json(); - setArray(data?.recentWatch); + setArray(data?.recentWatch.reverse()); setUser(data); } function fetchData() { @@ -398,7 +398,7 @@ export default function Home({ detail, populars }) { )} -- cgit v1.2.3