I am using react-router
where I have following code
<Router basename={config.historyBasename}>
<Routes>
<Route path={routes.landingPage} element={<LandingPage />} />
<Route
path={routes.activateAccount}
element={
!document.referrer.length ? (
redirectTo(appUrls.home)
) : (
<Parent/>
)
}
/>
</Routes>
</Router>
Here, I am using redirectTo
which I created custom method. Now here, I am trying to create a custom route which will do
<Route
path={routes.activateAccount}
element={
!document.referrer.length ? (
redirectTo(appUrls.home)
) : (
<Parent/>
)
}
/>
this. How can I create a custom route which will handle this ?