Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ const Body = styled(FlexCol)`
const DashboardFallback = signedOutFallback(Dashboard, Pages);
const HomeFallback = signedOutFallback(Dashboard, () => <Redirect to="/" />);
const LoginFallback = signedOutFallback(() => <Redirect to="/" />, Login);
const CommunityLoginFallback = signedOutFallback(
props => <Redirect to={`/${props.match.params.communitySlug}`} />,
CommunityLoginView
);
const NewCommunityFallback = signedOutFallback(NewCommunity, () => (
<Login redirectPath={`${CLIENT_URL}/new/community`} />
));
Expand Down Expand Up @@ -297,7 +301,7 @@ class Routes extends React.Component<Props> {
/>
<Route
path="/:communitySlug/login"
component={CommunityLoginView}
component={CommunityLoginFallback}
/>
<Route
path="/:communitySlug/:channelSlug"
Expand Down