I'm trying to display particular data for a specific name menu.
For example : /menu/${menuId}/{row.name} (here for instance menuId= "Menu1" and row.name= "Pea Soup"). I want to get all the information ( in <div> or <p> from my match.json that corresponds to Pea Soup for example when I'm clicking on "Pea Soup".
export default function MenuDisplay() {
const { menuId } = useParams();
const { match } = JsonData;
const matchData = match.find((el) => el._id_menu === menuId)?._ids ?? [];
const data = useMemo(
() => [
{
Header: "Name",
accessor: (row) => (
<Link to={{ pathname: `/menu/${menuId}/${row.name}` }}>
{row.name}
</Link>
)
}, ...
I'm able to display all the content of the match.json but not for a specific menu selection...
Here is the code : sandbox_link