{/*
switch only renders the first match. Subrouting happens downstream
https://reacttraining.com/react-router/web/api/Switch
*/}
}
/>
{/* Public Business Pages */}
}
/>
}
/>
}
/>
}
/>
}
/>
}
/>
}
/>
{/* App Pages */}
} />
}
/>
currentUser && currentUser.username ? (
) : currentUser && !currentUser.username ? (
) : isLoadingCurrentUser ? null : (
)
}
/>
currentUser && currentUser.username ? (
) : currentUser && !currentUser.username ? (
) : isLoadingCurrentUser ? null : (
)
}
/>
{/*
We check communitySlug last to ensure none of the above routes
pass. We handle null communitySlug values downstream by either
redirecting to home or showing a 404
*/}
}
/>
id-123-id, easy start that works
// - /some-custom-slug~id-123-id => id-123-id, custom slug also works
// - /~id-123-id => id-123-id => id-123-id, empty custom slug also works
// - /some~custom~slug~id-123-id => id-123-id, custom slug with delimiter char in it (~) also works! :tada:
path="/:communitySlug/:channelSlug/(.*~)?:threadId"
component={ThreadView}
/>
{isModal && (