We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5160a0 commit 082713bCopy full SHA for 082713b
1 file changed
src/app/(auth)/(navigationsBarLayout)/problems/page.tsx
@@ -1,6 +1,6 @@
1
'use client';
2
3
-import { useState } from 'react';
+import { useEffect, useState } from 'react';
4
import Image from 'next/image';
5
import ProblemTable from './ui/Table';
6
import { useProblemListQuery } from '@/entities/problems/model/query';
@@ -97,6 +97,9 @@ const ProblemsList = () => {
97
98
const totalPages = data?.totalPages ?? 0;
99
100
+ useEffect(() => {
101
+ setCurrentPage(0);
102
+ }, [categoryCode, difficulty]);
103
return (
104
<div className="flex flex-col px-10 py-18 w-full gap-4 justify-center items-center">
105
<div className="flex flex-col max-w-[1600px] w-full gap-6">
0 commit comments