diff --git a/frontend/src/b/Post.tsx b/frontend/src/b/Post.tsx index fe61ea9..fb18143 100644 --- a/frontend/src/b/Post.tsx +++ b/frontend/src/b/Post.tsx @@ -1,4 +1,5 @@ import { useEffect, useRef, useState, type CSSProperties, type MouseEvent, type ReactNode } from 'react' +import { createPortal } from 'react-dom' import { PostType, SlotTone, type GakSlide, type HoursSlide, type PlanSlide, type PostData, type ResFeed, type RowsSlide, type SunsetSlide, type WeekSlide } from '../api/client/types.gen' import { cx } from '../lib/utils' import { cardBg, clockShort, fall } from './lib' @@ -392,8 +393,9 @@ function FullCard({ post }: PostProps) { {n > 1 && } - {pop > 0 && ( - , + document.body, + )} + {likeFailed > 0 && createPortal( +

+ {liked ? '좋아요를 취소하지 못했어요' : '좋아요를 반영하지 못했어요'}. 다시 해 주세요. +

, + document.body, )} -

- {likeFailed > 0 && {liked ? '좋아요를 취소하지 못했어요' : '좋아요를 반영하지 못했어요'}. 다시 해 주세요.} -