We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
here's my code, when i refresh i get error 422, i'm trying to use this with search
import React, { useEffect, useState } from 'react' import parse from 'html-react-parser' import axios from 'axios' import { SEARCH } from '../sevices/globalServices' import { Pagination } from 'react-laravel-paginex' function SearchPage(props) { const form_data = props.location.state const [data, setdata] = useState([]) const getData = (data) => { axios.post(`${SEARCH()}page?=${data.current_page + 1}`, form_data).then(response => { setdata(response.data); console.log('getDAta', data) }); } useEffect(() => { const fetchDAta = async () => { await axios.post(SEARCH(), form_data).then(response => { setdata(response.data); console.log('data', data) }); } fetchDAta() }, [data]) return ( <div className='searchPage_container'> <h1> Search Page </h1> <div className="searchPage_grid"> {/* { data.length === 0 ? <p></p> : data.data.map(d => <div className="SearchPage_grid_card"> <img className='searchImg' src={d.photo} alt="" /> <div className='searchInfo'> <h4>{d.title__fr || d.name__fr}</h4> <p> {parse(`${d.text__fr || d.description__fr}`)} </p> </div> </div>) } */} </div> <div> <Pagination changePage={getData} data={data} /> </div> </div> ) } export default SearchPage
The text was updated successfully, but these errors were encountered:
No branches or pull requests
here's my code, when i refresh i get error 422, i'm trying to use this with search
The text was updated successfully, but these errors were encountered: