Skip to content

Commit

Permalink
Removed the magic number 40
Browse files Browse the repository at this point in the history
  • Loading branch information
Annaseli committed Feb 17, 2025
1 parent 3850419 commit a12b954
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webui/src/pages/auth/users/user/credentials.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {
} from "../../../../lib/components/controls";
import {useRouter} from "../../../../lib/hooks/router";

const EMAIL_TRUNCATION_THRESHOLD_LENGTH = 40;


const UserCredentialsList = ({ userId, after, onPaginate }) => {
const {user} = useUser();
Expand Down Expand Up @@ -53,7 +55,7 @@ const UserCredentialsList = ({ userId, after, onPaginate }) => {
overflow-hidden
text-truncate
align-bottom
${email.length > 40 ? "w-75" : ""}`}
${email.length > EMAIL_TRUNCATION_THRESHOLD_LENGTH ? "w-75" : ""}`}
title={email}
>
{email}
Expand Down

0 comments on commit a12b954

Please sign in to comment.