Revert "feat: 공유는 날씨각 링크만 보내기 (텍스트·이미지 없이)"

This reverts commit c67121351b.
This commit is contained in:
minaChoi committed 2026-10-07 17:30:43 +09:00
1 parent 2ce1fa2aed
commit 4ebf1cd894
7 files changed
+351 -58

No files matched your search

+5 -7
View File
@@ -11,8 +11,7 @@ import { useAuth } from './authContext'
import { useSheet } from './sheetContext'
import { CommentIcon, HeartIcon, SendIcon } from './svg'
import { useCarousel } from './carousel'
import { shareLink } from './shareLink'
import { Arrows, Credit, Ic, Rows, ScreenNote, Skel, Thumb } from './ui'
import { Arrows, Credit, Ic, Rows, Skel, Thumb } from './ui'
const ACCOUNTS: Record<PostType, readonly [string, string]> = {
[PostType.WEATHER]: ['오늘 날씨', 'sun'],
@@ -311,11 +310,11 @@ function FullCard({ post }: PostProps) {
const [pop, setPop] = useState(0)
const [likeFailed, setLikeFailed] = useState(0)
const lastTap = useRef(0)
const trackRef = useRef<HTMLDivElement>(null)
const [account, avatar] = ACCOUNTS[post.post_type]
const n = post.slides.length
const bgs = post.slides.map((sl) => slideBg(post, sl))
const [note, setNote] = useState('')
const share = () => void shareLink().then((m) => m && setNote(m))
const share = () => open({ type: 'share', share: { title: post.title, slides: Array.from(trackRef.current?.children ?? []).filter((c) => c instanceof HTMLElement) } })
const comments = () => open({ type: 'comments', postId: post.post_id })
const patch = (values: Partial<PostData>) => patchFeed(queryClient, post.post_id, values)
@@ -373,7 +372,7 @@ function FullCard({ post }: PostProps) {
</div>
<div className="relative aspect-[4/5] overflow-hidden" onClick={onTap}>
{n > 1 && (
<span className="absolute top-3 right-3 z-[2] rounded-full bg-[rgb(30_36_56/0.55)] px-[9px] py-[3px] text-xs font-extrabold text-white" aria-hidden="true">
<span data-noshot className="absolute top-3 right-3 z-[2] rounded-full bg-[rgb(30_36_56/0.55)] px-[9px] py-[3px] text-xs font-extrabold text-white" aria-hidden="true">
{index + 1}/{n}
</span>
)}
@@ -388,7 +387,7 @@ function FullCard({ post }: PostProps) {
if (e.key === 'ArrowRight') slider?.scrollNext()
}}
>
<div className="flex h-full">
<div ref={trackRef} className="flex h-full">
{post.slides.map((s, i) => (
<SlideView key={i} slide={s} bg={bgs[i]} />
))}
@@ -416,7 +415,6 @@ function FullCard({ post }: PostProps) {
</div>,
document.body,
)}
<ScreenNote text={note} setText={setNote} />
{likeFailed > 0 && createPortal(
<p role="alert" className="pointer-events-none fixed inset-x-0 bottom-[calc(88px+env(safe-area-inset-bottom,0px))] z-50 m-0 flex justify-center px-4">
<span className="rounded-full bg-[rgb(30_36_56/0.82)] px-3.5 py-2 text-[13px] font-bold text-white">{liked ? '좋아요를 취소하지 못했어요' : '좋아요를 반영하지 못했어요'}. 다시 해 주세요.</span>