From 6e5dc1c1504e491f839c23a840e405bc72bf0841 Mon Sep 17 00:00:00 2001 From: Monalisha Mishra <42746736+mishramonalisha76@users.noreply.github.com> Date: Thu, 2 May 2024 17:29:01 +0530 Subject: [PATCH 1/2] fix: fixed build issue (#1256) --- packages/uiweb/src/lib/hooks/chat/useGroupMemberUtilities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/uiweb/src/lib/hooks/chat/useGroupMemberUtilities.ts b/packages/uiweb/src/lib/hooks/chat/useGroupMemberUtilities.ts index c3a1c064c..ca1749816 100644 --- a/packages/uiweb/src/lib/hooks/chat/useGroupMemberUtilities.ts +++ b/packages/uiweb/src/lib/hooks/chat/useGroupMemberUtilities.ts @@ -60,7 +60,7 @@ const useGroupMemberUtilities = () => { async ({ chatId, accountId }: fetchMemberStatusParams): Promise => { setLoading(true); try { - const response = await user?.chat.group.participants.status(chatId, accountId); + const response = await user?.chat.group.participants.status(chatId, { overrideAccount: accountId }); console.debug(response); setLoading(false); return response; From 536d66887c8644e3b5dc8cfd10927456e8282717 Mon Sep 17 00:00:00 2001 From: harshrajat Date: Thu, 2 May 2024 19:51:46 +0400 Subject: [PATCH 2/2] fixed icon --- .../src/lib/components/notification/index.tsx | 259 +++++++++--------- 1 file changed, 124 insertions(+), 135 deletions(-) diff --git a/packages/uiweb/src/lib/components/notification/index.tsx b/packages/uiweb/src/lib/components/notification/index.tsx index 565347d2f..1f0e6767b 100644 --- a/packages/uiweb/src/lib/components/notification/index.tsx +++ b/packages/uiweb/src/lib/components/notification/index.tsx @@ -2,11 +2,7 @@ import * as PropTypes from 'prop-types'; import * as React from 'react'; import styled, { css } from 'styled-components'; -import { - MediaHelper, - convertTimeStamp, - extractTimeStamp, -} from '../../utilities'; +import { MediaHelper, convertTimeStamp, extractTimeStamp } from '../../utilities'; import IPFSIcon from '../ipfsicon'; import Loader from '../loader/loader'; import ImageOverlayComponent from '../overlay'; @@ -15,12 +11,17 @@ import chainDetails from './chainDetails'; import { DecryptButton, useDecrypt } from './decrypt'; import ActionButton from './styled/ActionButton'; -import { useDivOffsetWidth } from "../../hooks"; -import { LinkIcon } from "../../icons/Link"; +import { useDivOffsetWidth } from '../../hooks'; +import { LinkIcon } from '../../icons/Link'; import type { INotificationItemTheme } from './theme'; import { getCustomTheme } from './theme'; -export { baseTheme as notificationBaseTheme, darkTheme as notificationDarkTheme, lightTheme as notificationLightTheme, type INotificationItemTheme } from './theme'; +export { + baseTheme as notificationBaseTheme, + darkTheme as notificationDarkTheme, + lightTheme as notificationLightTheme, + type INotificationItemTheme, +} from './theme'; // ================= Define types export type chainNameType = @@ -67,7 +68,7 @@ export type NotificationItemProps = { type ContainerDataType = { timestamp?: string; -}& OffsetWidthType; +} & OffsetWidthType; type OffsetWidthType = { offsetWidth: number; }; @@ -103,20 +104,13 @@ export const NotificationItem: React.FC = ({ isSecret, decryptFn, }) => { - const { notificationBody: parsedBody, timeStamp } = extractTimeStamp( - notificationBody || '' - ); - const themeObject = getCustomTheme(theme,customTheme!); - + const { notificationBody: parsedBody, timeStamp } = extractTimeStamp(notificationBody || ''); + const themeObject = getCustomTheme(theme, customTheme!); - const { - notifTitle, - notifBody, - notifCta, - notifImage, - setDecryptedValues, - isSecretRevealed, - } = useDecrypt({ notificationTitle, parsedBody, cta, image }, isSecret); + const { notifTitle, notifBody, notifCta, notifImage, setDecryptedValues, isSecretRevealed } = useDecrypt( + { notificationTitle, parsedBody, cta, image }, + isSecret + ); const isCtaURLValid = MediaHelper.validURL(notifCta); const isChannelURLValid = MediaHelper.validURL(url); @@ -126,7 +120,7 @@ export const NotificationItem: React.FC = ({ const [subscribeLoading, setSubscribeLoading] = React.useState(false); const [isSubscribed, setIsSubscribed] = React.useState(true); //use this to confirm if this is s const [divRef, offsetWidth] = useDivOffsetWidth(); - + const showMetaInfo = isSecret || timeStamp; // console.log({ // chainName, @@ -190,7 +184,6 @@ export const NotificationItem: React.FC = ({ return ( = ({ {/* header that only pops up on small devices */} - - + + {app} {chainName && chainDetails[chainName] ? ( - {chainDetails[chainName].icon} + {chainDetails[chainName].icon} ) : null} {/* header that only pops up on small devices */} {/* content of the component */} - + {/* section for media content */} {notifImage && // if its an image then render this (!MediaHelper.isMediaSupportedVideo(notifImage) ? ( setImageOverlay(notifImage || '')} > - + ) : // if its a youtube url, RENDER THIS MediaHelper.isMediaYoutube(notifImage) ? ( - +