I'm want to navigate user to a specific url with a param into sees it as a list items with a view item button. When I click the view button item get the following warnng message
No routes matched location "/explore/0xD78Fb56DB0b68F9766975FEEbf7bFd0CF65C9F11"
in my App.js I have this
<BrowserRouter>
<Header style={styles.header}>
<Navbar />
<Account />
</Header>
<div style={styles.content}>
<Wrapper>
<Routes>
<Route path="/" element={<Home />} />
<Route path="create" element={<Creation user={account} />} />
<Route path="/explore" element={<Explore />} />
<Route path='/dashboard' element={<Dashboard />} />
<Route path='test' element={<Test />} />
</Routes>
</Wrapper>
</div>
</BrowserRouter>
all this routes work fine now in the /explore route I have my items list
and I did something like this (I followed the react-router doc)
return (
<div style={{marginTop:'5em'}}>
{isInitialized ?
<div className='wrapper'>
{eventArray.map(infoItem => (
<div key={infoItem.id}>
<CardEvent img={infoItem.pathImg ? infoItem.pathImg : lpass}
title={infoItem.idName}
date={infoItem.eventDate.toString()}
/>
<Link to={`/explore/${infoItem.id}`}>View event </Link>
</div>
)
)}
<Routes>
<Route
path='explore/:id'
element={<Test />}
/>
</Routes>
</div>
: <p>Error</p>
}
</div>
What did I do wrong here?