-
Notifications
You must be signed in to change notification settings - Fork 143
fix: Fixed markdown message in channel preview #1187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fixed markdown message in channel preview #1187
Conversation
✅ Deploy Preview for sendbird-uikit-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add unit tests for the newly added ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added unit tests @AhyoungRyu
3c10f9f
to
1000c09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
}; | ||
|
||
export const getLastMessage = (channel?: GroupChannel, stringSet = LabelStringSet) => channel?.lastMessage ? getPrettyLastMessage(channel?.lastMessage, stringSet) : ''; | ||
export const getLastMessage = (channel?: GroupChannel, stringSet = LabelStringSet) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이전에는 stringSet을 params로 넣는 방식을 택했었는데, 이제는 LocalizationContext에서 직접 가져오는 것도 괜찮을 것 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { stringSet } = useLocalization();
을 함수 안에 추가하는 방향일까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getLastMessage 는 현재 쓰이고 있는 곳들이 많아서 나중에 따로 보면 좋을것 같습니다
const { dateLocale, stringSet } = useLocalization(); | ||
const { isMobile } = useMediaQueryContext(); | ||
const isMentionEnabled = config.groupChannel.enableMention; | ||
const lastMessage = getLastMessage(channel, stringSet); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getLastMessage
의 이름을 보면 return값이 BaseMessage 등의 메시지 일 것 같은데
실제로는 string값이네요 좀 더 나은 이름이 있을까요? ex. getLastMessageText
Fixes CLNP-4063
Changelogs
Disabled
Enabled