I'm using react-router-dom
to support routing. I want to take a shortcut for supporting an admin screen, but want to know that it's relatively safe to do so.
I want to support a route similar to /admin12345
(so admin with a random pre-defined string). Could this be somehow made visible if someone were inspecting the website?
See code below:
export default function App() {
return (
<Router>
<Switch>
<Route path="/admin12345" component={AdminPage} />
<Route path="/" component={HomePage} />
</Switch>
</Router>
)
}