I have multiple routes. all pages are working fine with displaying 404 page if the URL is not proper. how to redirect to 404 the page if ordere ID is not available for such dynamic page.
routes
<BrowserRouter>
<App>
<Switch>
<Route exact path="/Dashboard" component={authGuard(Home)} />
<Route path="/Shop/Order/:orderID" component={authGuard(Order)} />
<Route path="/Shop/Shop-orders" component={authGuard(ShopOrders)} />
<Route path="/Shop/Shop-products" component={authGuard(ShopProducts)} />
<Route path="/Shop/Product/:productID" component={authGuard(Product)} />
<Route path="/Shop/Sign-in" component={loggedInGuard(SignIn)} />
<Route path="/Shop/Shop-profile" component={authGuard(Profile)} />
<Route exact path="/Shop/Invoice" component={authGuard(Invoice)} />
<Route path="/Shop/Invoice/:billID" component={authGuard(Bill)} />
<Route path="" component={PageNotFound} />
</Switch>
</App>
</BrowserRouter>