From d7852da5e526d89ad03ad1510472d7c87d682954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Wed, 25 Feb 2026 23:44:24 +0100 Subject: [PATCH] nicolium: cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- .../src/components/groups/group-avatar.tsx | 2 +- .../groups/popover/group-popover.tsx | 2 +- .../components/sidebar-navigation-link.tsx | 79 +++++++++---------- .../src/components/statuses/status-info.tsx | 2 +- packages/pl-fe/src/components/ui/avatar.tsx | 2 +- .../pl-fe/src/components/ui/icon-button.tsx | 4 +- packages/pl-fe/src/components/ui/toast.tsx | 2 +- .../chat-widget/chat-pane-header.tsx | 2 +- .../components/reply-group-indicator.tsx | 2 +- 9 files changed, 46 insertions(+), 51 deletions(-) diff --git a/packages/pl-fe/src/components/groups/group-avatar.tsx b/packages/pl-fe/src/components/groups/group-avatar.tsx index 028a3c116..a2a98cacd 100644 --- a/packages/pl-fe/src/components/groups/group-avatar.tsx +++ b/packages/pl-fe/src/components/groups/group-avatar.tsx @@ -10,7 +10,7 @@ interface IGroupAvatar { withRing?: boolean; } -const GroupAvatar = (props: IGroupAvatar) => { +const GroupAvatar: React.FC = (props) => { const { group, size, withRing = false } = props; const isOwner = group.relationship?.role === GroupRoles.OWNER; diff --git a/packages/pl-fe/src/components/groups/popover/group-popover.tsx b/packages/pl-fe/src/components/groups/popover/group-popover.tsx index 9649e6412..a4117e0d8 100644 --- a/packages/pl-fe/src/components/groups/popover/group-popover.tsx +++ b/packages/pl-fe/src/components/groups/popover/group-popover.tsx @@ -23,7 +23,7 @@ interface IGroupPopoverContainer { group: Group; } -const GroupPopover = (props: IGroupPopoverContainer) => { +const GroupPopover: React.FC = (props) => { const { children, group, isEnabled } = props; const shouldHideAction = !!useMatch({ from: groupTimelineRoute.fullPath, shouldThrow: false }); diff --git a/packages/pl-fe/src/components/sidebar-navigation-link.tsx b/packages/pl-fe/src/components/sidebar-navigation-link.tsx index f1fc2e2a6..b50ee6a58 100644 --- a/packages/pl-fe/src/components/sidebar-navigation-link.tsx +++ b/packages/pl-fe/src/components/sidebar-navigation-link.tsx @@ -21,54 +21,49 @@ interface ISidebarNavigationLink extends Partial { } /** Desktop sidebar navigation link. */ -const SidebarNavigationLink = React.memo( - React.forwardRef( - ( - props: ISidebarNavigationLink, - ref: React.ForwardedRef, - ): React.JSX.Element => { - const { icon, activeIcon, text, to, count, countMax, onClick, ...rest } = props; +const SidebarNavigationLink: React.FC = React.memo( + React.forwardRef((props, ref: React.ForwardedRef): React.JSX.Element => { + const { icon, activeIcon, text, to, count, countMax, onClick, ...rest } = props; - const matchRoute = useMatchRoute(); - const { demetricator } = useSettings(); + const matchRoute = useMatchRoute(); + const { demetricator } = useSettings(); - const LinkComponent = (to === undefined ? 'button' : Link) as typeof Link; + const LinkComponent = (to === undefined ? 'button' : Link) as typeof Link; - const isActive = matchRoute({ to }) !== false; + const isActive = matchRoute({ to }) !== false; - const handleClick: React.EventHandler = (e) => { - if (onClick) { - onClick(e); - e.preventDefault(); - e.stopPropagation(); - } - }; + const handleClick: React.EventHandler = (e) => { + if (onClick) { + onClick(e); + e.preventDefault(); + e.stopPropagation(); + } + }; - return ( -
  • - - - - + return ( +
  • + + + + -

    {text}

    -
    -
  • - ); - }, - ), +

    {text}

    + + + ); + }), (prevProps, nextProps) => prevProps.count === nextProps.count, ); diff --git a/packages/pl-fe/src/components/statuses/status-info.tsx b/packages/pl-fe/src/components/statuses/status-info.tsx index 098919e0c..057094701 100644 --- a/packages/pl-fe/src/components/statuses/status-info.tsx +++ b/packages/pl-fe/src/components/statuses/status-info.tsx @@ -9,7 +9,7 @@ interface IStatusInfo { title?: string; } -const StatusInfo = (props: IStatusInfo) => { +const StatusInfo: React.FC = (props) => { const { avatarSize, icon, text, className, title } = props; const onClick = (event: React.MouseEvent) => { diff --git a/packages/pl-fe/src/components/ui/avatar.tsx b/packages/pl-fe/src/components/ui/avatar.tsx index ccb9a4173..4ece5eea0 100644 --- a/packages/pl-fe/src/components/ui/avatar.tsx +++ b/packages/pl-fe/src/components/ui/avatar.tsx @@ -42,7 +42,7 @@ interface IAvatar extends Pick { +const Avatar: React.FC = (props) => { const intl = useIntl(); const { disableUserProvidedMedia } = useSettings(); diff --git a/packages/pl-fe/src/components/ui/icon-button.tsx b/packages/pl-fe/src/components/ui/icon-button.tsx index 56c5f5dbc..d35c90b79 100644 --- a/packages/pl-fe/src/components/ui/icon-button.tsx +++ b/packages/pl-fe/src/components/ui/icon-button.tsx @@ -20,8 +20,8 @@ interface IIconButton extends React.ButtonHTMLAttributes { } /** A clickable icon. */ -const IconButton = React.forwardRef( - (props: IIconButton, ref: React.ForwardedRef): React.JSX.Element => { +const IconButton: React.FC = React.forwardRef( + (props, ref: React.ForwardedRef): React.JSX.Element => { const { src, className, iconClassName, text, theme = 'seamless', ...filteredProps } = props; const Component = (props.href ? 'a' : 'button') as 'button'; diff --git a/packages/pl-fe/src/components/ui/toast.tsx b/packages/pl-fe/src/components/ui/toast.tsx index 779fe5ecd..f8d2df66f 100644 --- a/packages/pl-fe/src/components/ui/toast.tsx +++ b/packages/pl-fe/src/components/ui/toast.tsx @@ -36,7 +36,7 @@ interface IToast { /** * Customizable Toasts for in-app notifications. */ -const Toast = (props: IToast) => { +const Toast: React.FC = (props) => { const { t, message, type, action, actionLinkOptions, actionLabel, summary } = props; const intl = useIntl(); diff --git a/packages/pl-fe/src/features/chats/components/chat-widget/chat-pane-header.tsx b/packages/pl-fe/src/features/chats/components/chat-widget/chat-pane-header.tsx index 0d2912619..03217555c 100644 --- a/packages/pl-fe/src/features/chats/components/chat-widget/chat-pane-header.tsx +++ b/packages/pl-fe/src/features/chats/components/chat-widget/chat-pane-header.tsx @@ -20,7 +20,7 @@ interface IChatPaneHeader { secondaryActionTitle?: string; } -const ChatPaneHeader = (props: IChatPaneHeader) => { +const ChatPaneHeader: React.FC = (props) => { const { isOpen, isToggleable = true, diff --git a/packages/pl-fe/src/features/compose/components/reply-group-indicator.tsx b/packages/pl-fe/src/features/compose/components/reply-group-indicator.tsx index e14d2487b..70cd23d5a 100644 --- a/packages/pl-fe/src/features/compose/components/reply-group-indicator.tsx +++ b/packages/pl-fe/src/features/compose/components/reply-group-indicator.tsx @@ -13,7 +13,7 @@ interface IReplyGroupIndicator { composeId: string; } -const ReplyGroupIndicator = (props: IReplyGroupIndicator) => { +const ReplyGroupIndicator: React.FC = (props) => { const { composeId } = props; const getStatus = useCallback(makeGetStatus(), []);