Skip to content

Commit

Permalink
fix: Correct user count display in ActiveLocationSelector
Browse files Browse the repository at this point in the history
- fix: Adjust user count by subtracting off-shift reps
  • Loading branch information
Sampiiiii committed Oct 9, 2024
1 parent 32ddbca commit 91aeff4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export const UserCount: React.FC<UserCountProps> = ({ rep_count, off_shift_rep_c
setShowDetails(!showDetails);
};

const correctUserCount = user_count - off_shift_rep_count;

return (
<div
className="rounded-sm flex bg-card text-card-foreground p-2 space-x-2 cursor-pointer"
Expand All @@ -32,7 +34,7 @@ export const UserCount: React.FC<UserCountProps> = ({ rep_count, off_shift_rep_c
<span className="text-gray-500 dark:text-gray-400 uppercase font-mono">rep(s)</span>
<span>{off_shift_rep_count}</span>
<span className="text-gray-500 dark:text-gray-400 uppercase font-mono">off-shift rep(s)</span>
<span>{user_count}</span>
<span>{correctUserCount}</span>
<span className="text-gray-500 dark:text-gray-400 uppercase font-mono">user(s)</span>
</>
) : (
Expand Down

0 comments on commit 91aeff4

Please sign in to comment.