hi folks, new in Remix.
I am trying to fetch data with the loader from a CMS.
export async function loader({ params }: LoaderFunctionArgs) {
const response = await fetch(
`https://strapi-production-e982.up.railway.app/api/products?populate=*&filters[categorias][slug][$eq]=${params.url}}`
);
return json(await response.json());
}
const ProductURL = () => {
const params = useParams();
const data = useLoaderData<typeof loader>();
return ...
}
I keep getting the error in the console and in the browser: Error: Route "routes/productos.$url" does not match URL "/productos/panes"
The params.url is "panes" and the route is as productos.$url.tsx
What i am doing wrong here? why the route does not grab the $url value dynamically?