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

@@ -1,6 +1,8 @@
import React, { useState, useRef, useEffect, useCallback } from 'react'
import { createPortal } from 'react-dom'
import EmojiMartPicker from '../common/EmojiMartPicker'
import extractNativeEmoji from '../common/extractNativeEmoji'
import isEventWithinNode from '../common/isEventWithinNode'
import loadEmojiMartData from '../common/loadEmojiMartData'
/**
@@ -58,8 +60,7 @@ export default function EmojiPicker({ onSelect, editor }) {
useEffect(() => {
if (!open) return
const handler = (e) => {
if (panelRef.current && !panelRef.current.contains(e.target) &&
buttonRef.current && !buttonRef.current.contains(e.target)) {
if (!isEventWithinNode(e, panelRef.current) && !isEventWithinNode(e, buttonRef.current)) {
setOpen(false)
}
}
@@ -76,7 +77,12 @@ export default function EmojiPicker({ onSelect, editor }) {
}, [open])
const handleSelect = useCallback((emoji) => {
const native = emoji.native ?? ''
const native = extractNativeEmoji(emoji)
if (!native) {
setOpen(false)
return
}
onSelect?.(native)
if (editor) {
editor.chain().focus().insertContent(native).run()