From c67121351b66157c72dd428ca9831bc4ba55e4b0 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Wed, 7 Oct 2026 16:47:27 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B3=B5=EC=9C=A0=EB=8A=94=20=EB=82=A0?= =?UTF-8?q?=EC=94=A8=EA=B0=81=20=EB=A7=81=ED=81=AC=EB=A7=8C=20=EB=B3=B4?= =?UTF-8?q?=EB=82=B4=EA=B8=B0=20(=ED=85=8D=EC=8A=A4=ED=8A=B8=C2=B7?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=97=86=EC=9D=B4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 공유 버튼을 누르면 바로 휴대폰 공유창에 주소만 넘김. 공유창이 없으면 주소 복사 후 화면 아래 알림 - 공유 이미지 만들던 창·storyImage.ts 삭제 (메신저는 링크에 미리보기 그림을 붙임) --- frontend/src/b/Post.tsx | 12 +- frontend/src/b/Sheets.tsx | 103 +-------------- frontend/src/b/WeekPage.tsx | 17 +-- frontend/src/b/shareLink.ts | 22 ++++ frontend/src/b/sheetContext.ts | 3 - frontend/src/b/storyImage.ts | 229 --------------------------------- frontend/src/b/ui.tsx | 23 +++- 7 files changed, 58 insertions(+), 351 deletions(-) create mode 100644 frontend/src/b/shareLink.ts delete mode 100644 frontend/src/b/storyImage.ts 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 && ( -