feat: Implement forum feed layout and refactor space navigation logic to support new routing structure
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
_FEATURED_PATH,
|
||||
_INVITES_PATH,
|
||||
_JOIN_PATH,
|
||||
_FEED_PATH,
|
||||
_LOBBY_PATH,
|
||||
_NOTIFICATIONS_PATH,
|
||||
_ROOM_PATH,
|
||||
@@ -37,14 +38,13 @@ import {
|
||||
getInboxNotificationsPath,
|
||||
getLoginPath,
|
||||
getOriginBaseUrl,
|
||||
getSpaceLobbyPath,
|
||||
} from './pathUtils';
|
||||
import { ClientBindAtoms, ClientLayout, ClientRoot } from './client';
|
||||
import { Home, HomeRouteRoomProvider, HomeSearch } from './client/home';
|
||||
import { Direct, DirectCreate, DirectRouteRoomProvider } from './client/direct';
|
||||
import { RouteSpaceProvider, Space, SpaceRouteRoomProvider, SpaceSearch } from './client/space';
|
||||
import { RouteSpaceProvider, SpaceRouteRoomProvider, SpaceSearch, SpaceIndexRedirect } from './client/space';
|
||||
import { ForumAwareSpaceLayout } from '../features/forum/ForumAwareSpaceLayout';
|
||||
import { ForumSpaceLayout } from '../features/forum/ForumSpaceLayout';
|
||||
import { ForumFeedPage } from '../features/forum/ForumFeedPage';
|
||||
import { Explore, FeaturedRooms, PublicRooms } from './client/explore';
|
||||
import { Notifications, Inbox, Invites } from './client/inbox';
|
||||
import { setAfterLoginRedirectPath } from './afterLoginRedirectPath';
|
||||
@@ -238,25 +238,12 @@ export const createRouter = (clientConfig: ClientConfig, screenSize: ScreenSize)
|
||||
path={SPACE_PATH}
|
||||
element={
|
||||
<RouteSpaceProvider>
|
||||
<ForumSpaceLayout>
|
||||
<ForumAwareSpaceLayout />
|
||||
</ForumSpaceLayout>
|
||||
<ForumAwareSpaceLayout />
|
||||
</RouteSpaceProvider>
|
||||
}
|
||||
>
|
||||
{mobile ? null : (
|
||||
<Route
|
||||
index
|
||||
loader={({ params }) => {
|
||||
const { spaceIdOrAlias } = params;
|
||||
if (spaceIdOrAlias) {
|
||||
return redirect(getSpaceLobbyPath(spaceIdOrAlias));
|
||||
}
|
||||
return null;
|
||||
}}
|
||||
element={<WelcomePage />}
|
||||
/>
|
||||
)}
|
||||
<Route index element={<SpaceIndexRedirect />} />
|
||||
<Route path={_FEED_PATH} element={<ForumFeedPage />} />
|
||||
<Route path={_LOBBY_PATH} element={<Lobby />} />
|
||||
<Route path={_SEARCH_PATH} element={<SpaceSearch />} />
|
||||
<Route
|
||||
|
||||
Reference in New Issue
Block a user