import React from 'react';
import CollectionsOverview from '../../components/collections-overview/collections-overview.component';
import {Routes, Route} from 'react-router-dom';
import CategoryPage from '../category/category.component';
const ShopPage = ({match}) =>{
return (<div className="shop-page">
<Routes>
<Route exact path={ `${match.path}` } element={<CollectionsOverview />}/>
<Route exact path={ `${match.path}/:categoryId`} element={<CategoryPage/>}/>
</Routes>
</div>
)};
export default ShopPage;
The prop value match is undefined, which means that wherever you're using the ShopPage component, you have not defined the attribute, or the attribute value is undefined.
Thus, change it to something like:
<ShopPage match={somethinghere} />