Fix: Placeholder would overflow sidebar.

This commit is contained in:
Paul 2021-06-29 22:21:26 +01:00
parent 8935c26dfb
commit b31183e0f8
3 changed files with 5 additions and 3 deletions

View file

@ -27,7 +27,7 @@ export const GenericSidebarList = styled.div`
flex-grow: 1;
overflow-y: scroll;
> svg {
> img {
width: 100%;
}
`;

View file

@ -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" })}
/>
</Localizer>
{channelsArr.length === 0 && <img src="/assets/images/placeholder.svg" />}
{channelsArr.length === 0 && <img src={placeholderSVG} />}
{channelsArr.map(x => {
let user;
if (x.channel_type === 'DirectMessage') {

View file

@ -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" });