From: ts <124226059+uniformization@users.noreply.github.com> Date: Thu, 27 Jul 2023 03:55:10 +0000 (-0700) Subject: Fix Profile Viewer text (#1357) X-Git-Tag: v3.0.0~31 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=1adee07127f184dd024d235467732471f4a4f296;p=rainny.git Fix Profile Viewer text (#1357) If you only had a single session open, the Profile Viewer would've said "View 1 sessions" instead of "View 1 session." --- diff --git a/src/app/organisms/profile-viewer/ProfileViewer.jsx b/src/app/organisms/profile-viewer/ProfileViewer.jsx index fec9189..b6ce426 100644 --- a/src/app/organisms/profile-viewer/ProfileViewer.jsx +++ b/src/app/organisms/profile-viewer/ProfileViewer.jsx @@ -137,7 +137,7 @@ function SessionInfo({ userId }) { onClick={() => setIsVisible(!isVisible)} iconSrc={isVisible ? ChevronBottomIC : ChevronRightIC} > - {`View ${devices?.length > 0 ? `${devices.length} ` : ''}sessions`} + {`View ${devices?.length > 0 ? `${devices.length} ${devices.length == 1 ? 'session' : 'sessions'}` : 'sessions'}`} {renderSessionChips()}