From 66e946f0fc9172da626aac8f1674d67d0d6dbdbe Mon Sep 17 00:00:00 2001 From: Ryan Alexander <38785445+ryanalexander@users.noreply.github.com> Date: Tue, 17 Aug 2021 17:19:29 +1000 Subject: [PATCH] Centered mention count + Fixed file formatting for last commit --- .../navigation/left/ServerListSidebar.tsx | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/components/navigation/left/ServerListSidebar.tsx b/src/components/navigation/left/ServerListSidebar.tsx index 13933e7f..08f1b55e 100644 --- a/src/components/navigation/left/ServerListSidebar.tsx +++ b/src/components/navigation/left/ServerListSidebar.tsx @@ -5,9 +5,8 @@ import { Link, useHistory, useLocation, useParams } from "react-router-dom"; import { RelationshipStatus } from "revolt-api/types/Users"; import styled, { css } from "styled-components"; -import { Text } from "preact-i18n"; - import { attachContextMenu } from "preact-context-menu"; +import { Text } from "preact-i18n"; import ConditionalLink from "../../../lib/ConditionalLink"; import PaintCounter from "../../../lib/PaintCounter"; @@ -58,7 +57,17 @@ function Icon({ {unread === "mention" && ( <> - {count < 9 ? count : "9+"} + + {count < 10 ? count : "9+"} + )} @@ -268,7 +277,10 @@ export const ServerListSidebar = observer(({ unreads, lastOpened }: Props) => { homeActive && history.push("/settings") }> - + { - +