From 5ffde7494232e71a773ee517a82bb4180ec0129c Mon Sep 17 00:00:00 2001 From: root Date: Sat, 22 Mar 2025 17:20:01 +0000 Subject: [PATCH] Prepared some stuff for DMs update --- frontend/src/components/pages/guild-page.tsx | 2 +- .../src/components/pages/overview-page.tsx | 20 +++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/pages/guild-page.tsx b/frontend/src/components/pages/guild-page.tsx index 79d453b9..6ba962d4 100644 --- a/frontend/src/components/pages/guild-page.tsx +++ b/frontend/src/components/pages/guild-page.tsx @@ -19,7 +19,7 @@ const GuildPage: React.FunctionComponent = () => { const textChannels = useSelector(getGuildChannels(guildId)).filter(c => c.type === 'TEXT'); useEffect(() => { - dispatch(uiActions.pageSwitched({ channel, guild })); + dispatch(uiActions.pageSwitched({ channel, guild: guildId })); }, [guild, channel]); if (!guild) diff --git a/frontend/src/components/pages/overview-page.tsx b/frontend/src/components/pages/overview-page.tsx index 0b22a6fa..17ddd3c8 100644 --- a/frontend/src/components/pages/overview-page.tsx +++ b/frontend/src/components/pages/overview-page.tsx @@ -1,24 +1,36 @@ import { useEffect } from 'react'; -import { useDispatch } from 'react-redux'; -import { actions as ui } from '../../store/ui'; +import { useDispatch, useSelector } from 'react-redux'; +import { actions as uiActions } from '../../store/ui'; import AppNavbar from '../navigation/app-navbar'; import Sidebar from '../navigation/sidebar/sidebar'; import PageWrapper from './page-wrapper'; +import DMList from '../navigation/sidebar/dm-list'; +import TextBasedChannel from '../channel/text-based-channel'; const OverviewPage: React.FunctionComponent = () => { const dispatch = useDispatch(); + const ui = useSelector((s: Store.AppState) => s.ui); useEffect(() => { - dispatch(ui.pageSwitched({ channel: null, guild: null })); + dispatch(uiActions.pageSwitched({ channel: null, guild: null })); }, []); return ( + pageTitle="PVTChat"> + There's nothing here yet, sadly..
+
+ {ui.activeChannel && { + 'DM': , + }["DM"]} + +
); }