diff --git a/src/pages/home.jsx b/src/pages/home.jsx index 3dcdc4e..5d3b195 100644 --- a/src/pages/home.jsx +++ b/src/pages/home.jsx @@ -1,4 +1,4 @@ -import { useState } from "react"; +import { useEffect, useState } from "react"; import { ScoreCardSkeleton } from "@/components"; import { ScoreCard } from "@/components/home"; import { filters as filterData, sorts as sortData } from "@/filters"; @@ -17,6 +17,10 @@ const Home = () => { useTitle("Leaderboard | Bashaway"); + useEffect(() => { + if (page !== 1) setPage(1); + }, [filters, sorts]); + return ( <>