Skip to content

Commit

Permalink
✨ feat(text-length): truncate ellipses for username length (#51)
Browse files Browse the repository at this point in the history
* ✨ feat(text-length): truncate ellipses for username length

* ✨ feat(text-length): truncate ellipses for currentUser length

---------

Co-authored-by: Ayobami Akingbade <[email protected]>
  • Loading branch information
KyuubiTila and thrownullexception authored Apr 4, 2024
1 parent 8d7d49f commit fba2fd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/frontend/_layouts/app/LayoutImpl/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Typo } from "frontend/design-system/primitives/Typo";
import { ILabelValue } from "shared/types/options";
import { DropDownMenu } from "frontend/design-system/components/DropdownMenu";
import { SystemIconsKeys } from "shared/constants/Icons";
import { ellipsis } from "shared/lib/strings";
import { useConstantNavigationMenuItems } from "./portal";

const ProfileRoot = styled(Stack)`
Expand Down Expand Up @@ -49,7 +50,8 @@ export function ProfileOnNavigation({ isFullWidth }: IProps) {
return (
<ProfileRoot justify="space-between" align="center">
<Name weight="bold">
Hi, {currentUser.isLoading ? "There" : currentUser.data?.name}
Hi,
{currentUser.isLoading ? `There` : ellipsis(currentUser.data?.name, 14)}
</Name>

<DropDownMenu
Expand Down

0 comments on commit fba2fd5

Please sign in to comment.