feat: ship creator journey v2 and profile updates

This commit is contained in:
2026-04-12 21:42:07 +02:00
parent a2457f4e49
commit d5cff21ea2
335 changed files with 20147 additions and 1545 deletions

View File

@@ -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)