Get rid of 'content not found' page in categories

This commit is contained in:
Raphael Wickihalder 2022-05-29 09:51:55 +02:00 committed by Thomas Zarebczan
parent f56e552764
commit 2b60fe957f

View file

@ -305,6 +305,7 @@ function AppRouter(props: Props) {
return (
<React.Suspense fallback={<LoadingBarOneOff />}>
{categoryPages.length && (
<Switch>
<Redirect
from={`/$/${PAGES.DEPRECATED__CHANNELS_FOLLOWING_MANAGE}`}
@ -407,12 +408,21 @@ function AppRouter(props: Props) {
<Route path={`/$/${PAGES.EMBED}/:claimName/:claimId`} exact component={EmbedWrapperPage} />
{/* Below need to go at the end to make sure we don't match any of our pages first */}
<Route path={`/$/${PAGES.LATEST}/:channelName`} exact render={() => <ShowPage uri={uri} latestContentPath />} />
<Route path={`/$/${PAGES.LIVE_NOW}/:channelName`} exact render={() => <ShowPage uri={uri} liveContentPath />} />
<Route
path={`/$/${PAGES.LATEST}/:channelName`}
exact
render={() => <ShowPage uri={uri} latestContentPath />}
/>
<Route
path={`/$/${PAGES.LIVE_NOW}/:channelName`}
exact
render={() => <ShowPage uri={uri} liveContentPath />}
/>
<Route path="/:claimName" exact render={() => <ShowPage uri={uri} />} />
<Route path="/:claimName/:streamName" exact render={() => <ShowPage uri={uri} />} />
<Route path="/*" component={FourOhFourPage} />
</Switch>
)}
</React.Suspense>
);
}