feat: ship creator journey v2 and profile updates
This commit is contained in:
@@ -3,6 +3,8 @@ import axios from 'axios'
|
||||
import ShareArtworkModal from './ShareArtworkModal'
|
||||
import LinkPreviewCard from './LinkPreviewCard'
|
||||
import TagPeopleModal from './TagPeopleModal'
|
||||
import extractNativeEmoji from '../common/extractNativeEmoji'
|
||||
import isEventWithinNode from '../common/isEventWithinNode'
|
||||
|
||||
// Lazy-load the heavy emoji picker only when first opened
|
||||
const EmojiPicker = lazy(() => import('../common/EmojiMartPicker'))
|
||||
@@ -62,7 +64,7 @@ export default function PostComposer({ user, onPosted }) {
|
||||
useEffect(() => {
|
||||
if (!emojiOpen) return
|
||||
const handler = (e) => {
|
||||
if (emojiWrapRef.current && !emojiWrapRef.current.contains(e.target)) {
|
||||
if (!isEventWithinNode(e, emojiWrapRef.current)) {
|
||||
setEmojiOpen(false)
|
||||
}
|
||||
}
|
||||
@@ -72,7 +74,7 @@ export default function PostComposer({ user, onPosted }) {
|
||||
|
||||
// Insert emoji at current cursor position
|
||||
const insertEmoji = useCallback((emoji) => {
|
||||
const native = emoji.native ?? emoji.shortcodes ?? ''
|
||||
const native = extractNativeEmoji(emoji) || emoji?.shortcodes || ''
|
||||
const ta = textareaRef.current
|
||||
if (!ta) {
|
||||
setBody((b) => b + native)
|
||||
|
||||
Reference in New Issue
Block a user