export default function SinglePost() {
const location =useLocation();
const paths=location.pathname.split("/")[2];
console.log(paths);
useEffect(()=>{
const getpost= async () => {
const res=axios.get("/posts/"+paths)
console.log(res);
}
},[paths])
What should I do?
I checked out the some solution
The first solution says to change the webpack.config.js file and I am not able find that file. And is this the correct solutions.