From 9a81e3ae18b8143faba64ac4e623ffdbf753c9ae Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sat, 7 Oct 2023 18:12:48 +0200 Subject: [PATCH] refactor: remove name tooltip from user avatar Signed-off-by: Philip Molares --- .../common/user-avatar/user-avatar.tsx | 17 ++--------------- .../landing-layout/navigation/user-dropdown.tsx | 2 +- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/common/user-avatar/user-avatar.tsx b/frontend/src/components/common/user-avatar/user-avatar.tsx index 51ea44a12..728f71595 100644 --- a/frontend/src/components/common/user-avatar/user-avatar.tsx +++ b/frontend/src/components/common/user-avatar/user-avatar.tsx @@ -6,9 +6,7 @@ import { useTranslatedText } from '../../../hooks/common/use-translated-text' import { ShowIf } from '../show-if/show-if' import styles from './user-avatar.module.scss' -import React, { useCallback, useMemo } from 'react' -import { OverlayTrigger, Tooltip } from 'react-bootstrap' -import type { OverlayInjectedProps } from 'react-bootstrap/Overlay' +import React, { useMemo } from 'react' import { useAvatarUrl } from './hooks/use-avatar-url' export interface UserAvatarProps { @@ -55,15 +53,6 @@ export const UserAvatar: React.FC = ({ ) const imgDescription = useTranslatedText('common.avatarOf', imageTranslateOptions) - const tooltip = useCallback( - (overlayInjectedProps: OverlayInjectedProps) => ( - - {displayName} - - ), - [displayName] - ) - return ( {/* eslint-disable-next-line @next/next/no-img-element */} @@ -76,9 +65,7 @@ export const UserAvatar: React.FC = ({ width={imageSize} /> - - {displayName} - + {displayName} ) diff --git a/frontend/src/components/landing-layout/navigation/user-dropdown.tsx b/frontend/src/components/landing-layout/navigation/user-dropdown.tsx index 05b25c312..aac014338 100644 --- a/frontend/src/components/landing-layout/navigation/user-dropdown.tsx +++ b/frontend/src/components/landing-layout/navigation/user-dropdown.tsx @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */