mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-31 10:22:36 +01:00
Fix bubble click url
This commit is contained in:
parent
51960f7e50
commit
6e4c5e26b7
@ -1,5 +1,5 @@
|
||||
import { FC } from 'react';
|
||||
import { NotificationBubbleItem } from '../../../../api';
|
||||
import { NotificationBubbleItem, NotificationUtilities } from '../../../../api';
|
||||
import { Flex, LayoutNotificationBubbleView, LayoutNotificationBubbleViewProps, Text } from '../../../../common';
|
||||
|
||||
export interface NotificationDefaultBubbleViewProps extends LayoutNotificationBubbleViewProps
|
||||
@ -13,8 +13,10 @@ export const NotificationDefaultBubbleView: FC<NotificationDefaultBubbleViewProp
|
||||
|
||||
const htmlText = item.message.replace(/\r\n|\r|\n/g, '<br />');
|
||||
|
||||
NotificationUtilities.openUrl(item.linkUrl);
|
||||
|
||||
return (
|
||||
<LayoutNotificationBubbleView close={ close } gap={ 2 } alignItems="center" { ...rest }>
|
||||
<LayoutNotificationBubbleView close={ close } gap={ 2 } alignItems="center" onClick={ event => (item.linkUrl && item.linkUrl.length && NotificationUtilities.openUrl(item.linkUrl)) } { ...rest }>
|
||||
<Flex center className="bubble-image-container">
|
||||
{ (item.iconUrl && item.iconUrl.length) &&
|
||||
<img className="no-select" src={ item.iconUrl } alt="" /> }
|
||||
|
Loading…
x
Reference in New Issue
Block a user