revert 5ffde7494232e71a773ee517a82bb4180ec0129c
revert Prepared some stuff for DMs update
This commit is contained in:
parent
5ffde74942
commit
5b40c01306
@ -19,7 +19,7 @@ const GuildPage: React.FunctionComponent = () => {
|
|||||||
const textChannels = useSelector(getGuildChannels(guildId)).filter(c => c.type === 'TEXT');
|
const textChannels = useSelector(getGuildChannels(guildId)).filter(c => c.type === 'TEXT');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
dispatch(uiActions.pageSwitched({ channel, guild: guildId }));
|
dispatch(uiActions.pageSwitched({ channel, guild }));
|
||||||
}, [guild, channel]);
|
}, [guild, channel]);
|
||||||
|
|
||||||
if (!guild)
|
if (!guild)
|
||||||
|
@ -1,36 +1,24 @@
|
|||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { actions as uiActions } from '../../store/ui';
|
import { actions as ui } from '../../store/ui';
|
||||||
import AppNavbar from '../navigation/app-navbar';
|
import AppNavbar from '../navigation/app-navbar';
|
||||||
import Sidebar from '../navigation/sidebar/sidebar';
|
import Sidebar from '../navigation/sidebar/sidebar';
|
||||||
import PageWrapper from './page-wrapper';
|
import PageWrapper from './page-wrapper';
|
||||||
import DMList from '../navigation/sidebar/dm-list';
|
|
||||||
import TextBasedChannel from '../channel/text-based-channel';
|
|
||||||
|
|
||||||
const OverviewPage: React.FunctionComponent = () => {
|
const OverviewPage: React.FunctionComponent = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const ui = useSelector((s: Store.AppState) => s.ui);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
dispatch(uiActions.pageSwitched({ channel: null, guild: null }));
|
dispatch(ui.pageSwitched({ channel: null, guild: null }));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageWrapper
|
<PageWrapper
|
||||||
className="bg-bg-primary h-full w-full"
|
className="bg-bg-primary h-full w-full"
|
||||||
pageTitle="PVTChat">
|
pageTitle="acrd.app">
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
<AppNavbar />
|
<AppNavbar />
|
||||||
There's nothing here yet, sadly..
|
|
||||||
<div className="bg-bg-primary h-full w-full flex flex-col flex-grow"></div>
|
<div className="bg-bg-primary h-full w-full flex flex-col flex-grow"></div>
|
||||||
<div
|
|
||||||
style={{ height: 'calc(100vh - 48px)' }}
|
|
||||||
className="flex">
|
|
||||||
{ui.activeChannel && {
|
|
||||||
'DM': <TextBasedChannel />,
|
|
||||||
}["DM"]}
|
|
||||||
<DMList />
|
|
||||||
</div>
|
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user