mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-26 07:22:10 -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;
|
||||
overflow-y: scroll;
|
||||
|
||||
> svg {
|
||||
> img {
|
||||
width: 100%;
|
||||
}
|
||||
`;
|
||||
|
|
|
@ -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') {
|
||||
|
|
|
@ -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" });
|
||||
|
|
Loading…
Reference in a new issue