feat: 축제·전시·콘서트·팝업 7일마다 수집, 피드 행사 종류 섞기
- 행사 수집을 화면 요청에서 빼고 worker 가 월 04:00(켤 때 7일 기록 없으면 한 번) 전국 17개 시도를 받는다 - 문화정보원 음악/콘서트(B000) 추가, 쪽·시도 사이 1초 간격으로 초당 요청 제한 회피 - 팝가(popga.co.kr) 팝업스토어 수집: 사이트맵 + 상세 JSON-LD, 바뀐 페이지만 다시 읽음 - 수집이 끝나면 Teams Workflows webhook 으로 종류별 건수 알림 (TEAMS_WEBHOOK_URL) - event.kind(1=축제 2=전시 3=콘서트 4=팝업) 칸과 종류별 아이콘 추가 - 피드 행사 카드·띠를 축제→팝업→전시→콘서트 차례로 섞음 - 포스트 종류별 내용·피드 기획 문서 갱신 같은 작업 폴더의 다른 작업(외부 API 가드, 노을·달 계산, 각 API, 문서 파일 이름 정리 등)도 함께 담김.
This commit is contained in:
1 parent
b61ed92c54
commit
997a366e76
70 files changed
+2083
-649
No files matched your search
@@ -303,6 +303,8 @@ function GakSheet({ indexId, onTitle }: { indexId: number; onTitle: (t: string)
|
||||
const load = loadOf(q)
|
||||
if (!g) return <Body>{load === 'loading' ? <GakSkel /> : <StateBox load={load} onRetry={() => q.refetch()} empty="이 각의 계산 근거가 아직 없어요." hold={<GakSkel />} className="inset-0" />}</Body>
|
||||
const factors = d.factors ?? []
|
||||
const bands = d.bands ?? []
|
||||
const now = bands.find((b) => b.current)
|
||||
return (
|
||||
<Body>
|
||||
<div className="flex items-center gap-3">
|
||||
@@ -313,6 +315,12 @@ function GakSheet({ indexId, onTitle }: { indexId: number; onTitle: (t: string)
|
||||
</div>
|
||||
<b className="ml-auto font-bagel text-[42px] font-normal text-(--orange)">{g.score}</b>
|
||||
</div>
|
||||
{now && (
|
||||
<p className="mt-3 rounded-2xl bg-[#fff4ec] px-3.5 py-2.5 text-[14.5px] font-bold">
|
||||
<b className="mr-1.5 font-jua font-normal text-(--orange)">{now.low}~{now.high}점</b>
|
||||
{now.text}
|
||||
</p>
|
||||
)}
|
||||
{factors.length > 2 && <Radar name={g.name} factors={factors} />}
|
||||
{g.trend && g.trend.length > 0 && (
|
||||
<div className="mt-2.5 grid grid-cols-4 gap-1.5">
|
||||
@@ -325,6 +333,18 @@ function GakSheet({ indexId, onTitle }: { indexId: number; onTitle: (t: string)
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{bands.length > 0 && (
|
||||
<ol className="mt-3.5 flex flex-col gap-1.5" aria-label="점수 구간별 설명">
|
||||
{bands.map((b) => (
|
||||
<li key={b.low} className={cx('grid grid-cols-[62px_1fr] items-start gap-2 text-[13px] font-semibold', !b.current && 'opacity-45')}>
|
||||
<span className={cx('rounded-full py-px text-center font-jua text-xs text-white tabular-nums', b.current ? 'bg-(--orange)' : 'bg-(--ink3)')}>
|
||||
{b.low}~{b.high}
|
||||
</span>
|
||||
<span>{b.text}</span>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
)}
|
||||
<div className="mt-3.5 flex flex-col gap-2.5">
|
||||
{factors.map((f) => (
|
||||
<div key={f.axis} className="grid grid-cols-[84px_1fr_52px] items-center gap-x-2.5 text-[13.5px] font-bold">
|
||||
@@ -566,6 +586,7 @@ function ShareSheet({ share }: { share: SharePayload }) {
|
||||
}
|
||||
|
||||
/* ---------- 댓글 ---------- */
|
||||
const NOT_FOUND = 3001 // 서버 ErrorType.NOT_FOUND
|
||||
const EMOJIS = ['☀️', '🌂', '🍻', '🌇', '😍', '👍']
|
||||
|
||||
function CommentRow({ c, postId }: { c: CommentData; postId: number }) {
|
||||
@@ -579,28 +600,36 @@ function CommentRow({ c, postId }: { c: CommentData; postId: number }) {
|
||||
const unlike = useMutation(unlikeCommentMutation())
|
||||
const remove = useMutation(deleteCommentMutation())
|
||||
const [removeFailed, setRemoveFailed] = useState(false)
|
||||
const [likeFailed, setLikeFailed] = useState(false)
|
||||
|
||||
const toggle = () => {
|
||||
if (!loggedIn) return open({ type: 'login' })
|
||||
if (like.isPending || unlike.isPending) return
|
||||
const next = !liked
|
||||
setLikeFailed(false)
|
||||
setLiked(next)
|
||||
setCount((n) => n + (next ? 1 : -1))
|
||||
const revert = () => {
|
||||
setLiked(!next)
|
||||
setCount(c.like_count)
|
||||
}
|
||||
;(next ? like : unlike).mutate(
|
||||
{ path: { comment_id: c.comment_id } },
|
||||
{
|
||||
onSuccess: (res) => {
|
||||
if (!res.result?.success) {
|
||||
setLiked(!next)
|
||||
setCount(c.like_count)
|
||||
if (res.result?.success) {
|
||||
setLiked(!!res.liked)
|
||||
if (res.like_count != null) setCount(res.like_count)
|
||||
return
|
||||
}
|
||||
setLiked(!!res.liked)
|
||||
if (res.like_count != null) setCount(res.like_count)
|
||||
revert()
|
||||
// 그 사이 지워진 댓글이면 알림 없이 목록을 다시 받아 사라지게 한다
|
||||
if (res.result?.code === NOT_FOUND) queryClient.invalidateQueries({ queryKey: listCommentsInfiniteQueryKey({ path: { post_id: postId } }) })
|
||||
else setLikeFailed(true)
|
||||
},
|
||||
onError: () => {
|
||||
setLiked(!next)
|
||||
setCount(c.like_count)
|
||||
revert()
|
||||
setLikeFailed(true)
|
||||
},
|
||||
},
|
||||
)
|
||||
@@ -636,7 +665,7 @@ function CommentRow({ c, postId }: { c: CommentData; postId: number }) {
|
||||
{c.body}
|
||||
</p>
|
||||
<small className="mt-0.5 block text-xs font-bold text-(--ink3)">
|
||||
{ago(c.created_at)} · 좋아요 {count}개
|
||||
{ago(c.created_at)} · {likeFailed ? <span className="text-(--heart)" role="alert">좋아요를 못 했어요. 잠시 뒤에 다시 눌러 주세요</span> : `좋아요 ${count}개`}
|
||||
{c.mine && (
|
||||
<>
|
||||
{' · '}
|
||||
|
||||
Reference in new issue
Block a user