mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-25 16:40:58 -05:00
Fix: Placeholder would overflow sidebar.
This commit is contained in:
parent
8935c26dfb
commit
b31183e0f8
3 changed files with 5 additions and 3 deletions
|
@ -27,7 +27,7 @@ export const GenericSidebarList = styled.div`
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
|
||||||
> svg {
|
> img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -21,6 +21,8 @@ import { Link, Redirect, useLocation, useParams } from "react-router-dom";
|
||||||
import { useIntermediate } from "../../../context/intermediate/Intermediate";
|
import { useIntermediate } from "../../../context/intermediate/Intermediate";
|
||||||
import { useDMs, useForceUpdate, useUsers } from "../../../context/revoltjs/hooks";
|
import { useDMs, useForceUpdate, useUsers } from "../../../context/revoltjs/hooks";
|
||||||
|
|
||||||
|
import placeholderSVG from "../items/placeholder.svg";
|
||||||
|
|
||||||
type Props = WithDispatcher & {
|
type Props = WithDispatcher & {
|
||||||
unreads: Unreads;
|
unreads: Unreads;
|
||||||
}
|
}
|
||||||
|
@ -113,7 +115,7 @@ function HomeSidebar(props: Props) {
|
||||||
action={() => openScreen({ id: "special_input", type: "create_group" })}
|
action={() => openScreen({ id: "special_input", type: "create_group" })}
|
||||||
/>
|
/>
|
||||||
</Localizer>
|
</Localizer>
|
||||||
{channelsArr.length === 0 && <img src="/assets/images/placeholder.svg" />}
|
{channelsArr.length === 0 && <img src={placeholderSVG} />}
|
||||||
{channelsArr.map(x => {
|
{channelsArr.map(x => {
|
||||||
let user;
|
let user;
|
||||||
if (x.channel_type === 'DirectMessage') {
|
if (x.channel_type === 'DirectMessage') {
|
||||||
|
|
|
@ -112,7 +112,7 @@ function Context({ auth, children, dispatcher }: Props) {
|
||||||
logout: async shouldRequest => {
|
logout: async shouldRequest => {
|
||||||
dispatcher({ type: "LOGOUT" });
|
dispatcher({ type: "LOGOUT" });
|
||||||
|
|
||||||
delete client.user;
|
client.reset();
|
||||||
dispatcher({ type: "RESET" });
|
dispatcher({ type: "RESET" });
|
||||||
|
|
||||||
openScreen({ id: "none" });
|
openScreen({ id: "none" });
|
||||||
|
|
Loading…
Reference in a new issue