<HashRouter>
<div>
<Route path="/" exact component={Home} />
<Route path="/details/:service" component={Service} />
</div>
</HashRouter>
...
{servicesList.map((service, index) => (
<tr
onClick={() => {
history.push("/details/" + service);
}}
key={service}
>
<td>{service}</td>
</tr>
))}
...