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."
This commit is contained in:
ts 2023-07-26 20:55:10 -07:00 committed by GitHub
parent 3c60976efa
commit 1adee07127
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -137,7 +137,7 @@ function SessionInfo({ userId }) {
onClick={() => setIsVisible(!isVisible)}
iconSrc={isVisible ? ChevronBottomIC : ChevronRightIC}
>
<Text variant="b2">{`View ${devices?.length > 0 ? `${devices.length} ` : ''}sessions`}</Text>
<Text variant="b2">{`View ${devices?.length > 0 ? `${devices.length} ${devices.length == 1 ? 'session' : 'sessions'}` : 'sessions'}`}</Text>
</MenuItem>
{renderSessionChips()}
</div>