File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ await import("./src/env.js");
88const config = {
99 swcMinify : false ,
1010 images : {
11- domains : [ "storage.googleapis.com" ] ,
11+ domains : [ "storage.googleapis.com" , "res.cloudinary.com" ] ,
1212 } ,
1313 async headers ( ) {
1414 return [
Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ const CatalogueContent = () => {
5757 const [ currentPage , setCurrentPage ] = useState ( 1 ) ;
5858 const [ papersPerPage , setPapersPerPage ] = useState ( 12 ) ; // show 12 per page
5959
60+ useEffect ( ( ) => {
61+ console . log ( "subject" , subject ) ;
62+ setCurrentPage ( 1 ) ;
63+ } , [ subject ] ) ;
64+
6065 // Fetch related subjects when subject changes
6166 useEffect ( ( ) => {
6267 if ( ! subject ) return ;
@@ -88,6 +93,7 @@ const CatalogueContent = () => {
8893 const filteredSubjects = courses . map ( ( course ) => course . name ) ;
8994 setSubjects ( filteredSubjects ) ;
9095 } , [ pathname , courses ] ) ;
96+
9197 // Set initial state from searchParams on client-side mount
9298 useEffect ( ( ) => {
9399 setIsMounted ( true ) ;
You can’t perform that action at this time.
0 commit comments