fix search extended pagination
This commit is contained in:
parent
dc32a68fbc
commit
815f090a12
1 changed files with 2 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ import { searchQuestions } from 'services/questionsServices';
|
|||
export default function Search() {
|
||||
const [searchParams] = useSearchParams();
|
||||
|
||||
const getData = async () => {
|
||||
const getData = async ({ question_id }) => {
|
||||
let match = {};
|
||||
const regexMatch = {}
|
||||
const time = {};
|
||||
|
|
@ -32,7 +32,7 @@ export default function Search() {
|
|||
const title = searchParams.get('title');
|
||||
if (title) regexMatch.title = title.replaceAll(' ', '|');
|
||||
|
||||
const { questions } = await searchQuestions({ regexMatch, match })
|
||||
const { questions } = await searchQuestions({ after: question_id, regexMatch, match })
|
||||
|
||||
return questions;
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue