From 38dd135f67d692c6e175959f8b00dd2ab5e281ea Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 2 Aug 2021 21:36:49 +0100 Subject: [PATCH] Open settings when clicking top left on desktop. --- .../navigation/left/ServerListSidebar.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/navigation/left/ServerListSidebar.tsx b/src/components/navigation/left/ServerListSidebar.tsx index 5cb239cc..0dc69ae6 100644 --- a/src/components/navigation/left/ServerListSidebar.tsx +++ b/src/components/navigation/left/ServerListSidebar.tsx @@ -1,7 +1,7 @@ import { Plus } from "@styled-icons/boxicons-regular"; import { Compass } from "@styled-icons/boxicons-solid"; import { observer } from "mobx-react-lite"; -import { useLocation, useParams } from "react-router-dom"; +import { useHistory, useLocation, useParams } from "react-router-dom"; import { RelationshipStatus } from "revolt-api/types/Users"; import styled, { css } from "styled-components"; @@ -98,7 +98,7 @@ const ServerEntry = styled.div<{ active: boolean; home?: boolean }>` :focus { outline: 3px solid blue; - } + } > div { height: 42px; @@ -150,8 +150,11 @@ const ServerEntry = styled.div<{ active: boolean; home?: boolean }>` function Swoosh() { return ( - - + - ); } @@ -211,6 +213,7 @@ export const ServerListSidebar = observer(({ unreads, lastOpened }: Props) => { }; }); + const history = useHistory(); const path = useLocation().pathname; const { openScreen } = useIntermediate(); @@ -251,7 +254,7 @@ export const ServerListSidebar = observer(({ unreads, lastOpened }: Props) => {
- homeActive && openContextMenu("Status") + homeActive && history.push("/settings") }>