diff --git a/frontend/src/b/Post.tsx b/frontend/src/b/Post.tsx index fb18143..785b6ab 100644 --- a/frontend/src/b/Post.tsx +++ b/frontend/src/b/Post.tsx @@ -11,7 +11,8 @@ import { useAuth } from './authContext' import { useSheet } from './sheetContext' import { CommentIcon, HeartIcon, SendIcon } from './svg' import { useCarousel } from './carousel' -import { Arrows, Credit, Ic, Rows, Skel, Thumb } from './ui' +import { shareLink } from './shareLink' +import { Arrows, Credit, Ic, Rows, ScreenNote, Skel, Thumb } from './ui' const ACCOUNTS: Record = { [PostType.WEATHER]: ['오늘 날씨', 'sun'], @@ -309,11 +310,11 @@ function FullCard({ post }: PostProps) { const [pop, setPop] = useState(0) const [likeFailed, setLikeFailed] = useState(0) const lastTap = useRef(0) - const trackRef = useRef(null) const [account, avatar] = ACCOUNTS[post.post_type] const n = post.slides.length const bgs = post.slides.map((sl) => slideBg(post, sl)) - const share = () => open({ type: 'share', share: { title: post.title, slides: Array.from(trackRef.current?.children ?? []).filter((c) => c instanceof HTMLElement) } }) + const [note, setNote] = useState('') + const share = () => void shareLink().then((m) => m && setNote(m)) const comments = () => open({ type: 'comments', postId: post.post_id }) const patch = (values: Partial) => patchFeed(queryClient, post.post_id, values) @@ -371,7 +372,7 @@ function FullCard({ post }: PostProps) {
{n > 1 && ( -