From 9ee3286f7a5fba33624901a3181d681984482da9 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 25 Mar 2024 11:26:14 +1100 Subject: [PATCH] fix: share props type for SessionNotificationCount --- ts/components/icon/SessionNotificationCount.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ts/components/icon/SessionNotificationCount.tsx b/ts/components/icon/SessionNotificationCount.tsx index 734cb96d8..ac26a8872 100644 --- a/ts/components/icon/SessionNotificationCount.tsx +++ b/ts/components/icon/SessionNotificationCount.tsx @@ -2,6 +2,8 @@ import React from 'react'; import styled from 'styled-components'; type Props = { + overflowingAt: number; + centeredOnTop: boolean; count?: number; }; const StyledCountContainer = styled.div<{ centeredOnTop: boolean }>` @@ -39,11 +41,7 @@ const OverflowingAt = (props: { overflowingAt: number }) => { ); }; -const NotificationOrUnreadCount = ({ - centeredOnTop, - overflowingAt, - count, -}: Props & { overflowingAt: number; centeredOnTop: boolean }) => { +const NotificationOrUnreadCount = ({ centeredOnTop, overflowingAt, count }: Props) => { if (!count) { return null; } @@ -58,10 +56,10 @@ const NotificationOrUnreadCount = ({ ); }; -export const SessionNotificationCount = (props: Props) => { +export const SessionNotificationCount = (props: Pick) => { return ; }; -export const SessionUnreadCount = (props: Props) => { +export const SessionUnreadCount = (props: Pick) => { return ; };