From b31183e0f813eab760013100b44b75073dec5157 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 29 Jun 2021 22:21:26 +0100 Subject: [PATCH] Fix: Placeholder would overflow sidebar. --- src/components/navigation/SidebarBase.tsx | 2 +- src/components/navigation/left/HomeSidebar.tsx | 4 +++- src/context/revoltjs/RevoltClient.tsx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/navigation/SidebarBase.tsx b/src/components/navigation/SidebarBase.tsx index 4cf8b1a7..c751d7f7 100644 --- a/src/components/navigation/SidebarBase.tsx +++ b/src/components/navigation/SidebarBase.tsx @@ -27,7 +27,7 @@ export const GenericSidebarList = styled.div` flex-grow: 1; overflow-y: scroll; - > svg { + > img { width: 100%; } `; diff --git a/src/components/navigation/left/HomeSidebar.tsx b/src/components/navigation/left/HomeSidebar.tsx index 13daf264..98cbc6e9 100644 --- a/src/components/navigation/left/HomeSidebar.tsx +++ b/src/components/navigation/left/HomeSidebar.tsx @@ -21,6 +21,8 @@ import { Link, Redirect, useLocation, useParams } from "react-router-dom"; import { useIntermediate } from "../../../context/intermediate/Intermediate"; import { useDMs, useForceUpdate, useUsers } from "../../../context/revoltjs/hooks"; +import placeholderSVG from "../items/placeholder.svg"; + type Props = WithDispatcher & { unreads: Unreads; } @@ -113,7 +115,7 @@ function HomeSidebar(props: Props) { action={() => openScreen({ id: "special_input", type: "create_group" })} /> - {channelsArr.length === 0 && } + {channelsArr.length === 0 && } {channelsArr.map(x => { let user; if (x.channel_type === 'DirectMessage') { diff --git a/src/context/revoltjs/RevoltClient.tsx b/src/context/revoltjs/RevoltClient.tsx index 85bec3b7..5ca77857 100644 --- a/src/context/revoltjs/RevoltClient.tsx +++ b/src/context/revoltjs/RevoltClient.tsx @@ -112,7 +112,7 @@ function Context({ auth, children, dispatcher }: Props) { logout: async shouldRequest => { dispatcher({ type: "LOGOUT" }); - delete client.user; + client.reset(); dispatcher({ type: "RESET" }); openScreen({ id: "none" });