From 7a970fa1ad968988f7dfb7705b6a0db9015717d1 Mon Sep 17 00:00:00 2001 From: GulSam00 Date: Wed, 8 Apr 2026 22:08:23 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat=20:=20=EC=B6=9C=EC=84=9D=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EB=AA=A8=EB=8B=AC=20=EC=83=81=ED=83=9C=20=EB=B6=80?= =?UTF-8?q?=EB=AA=A8=20=EA=B4=80=EB=A6=AC=20=EB=B0=8F=20=EC=B2=AB=20?= =?UTF-8?q?=EC=A0=91=EC=86=8D=20=EC=8B=9C=20=EC=9E=90=EB=8F=99=20=EC=98=A4?= =?UTF-8?q?=ED=94=88=20(#182)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/Header.tsx | 10 ++++++++++ apps/web/src/components/CheckInModal.tsx | 9 +++------ apps/web/src/components/FallingIcons.tsx | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/web/src/Header.tsx b/apps/web/src/Header.tsx index 6baf813a..1b388b3d 100644 --- a/apps/web/src/Header.tsx +++ b/apps/web/src/Header.tsx @@ -1,5 +1,6 @@ 'use client'; +import { format } from 'date-fns'; import { CalendarCheck, MessageCircleQuestion, Moon, Sun } from 'lucide-react'; import { useTheme } from 'next-themes'; import { useRouter } from 'next/navigation'; @@ -58,6 +59,8 @@ export default function Header() { const { data: user, isLoading } = useUserQuery(); const lastCheckIn = user?.last_check_in ?? new Date(); + const today = format(new Date(), 'yyyy-MM-dd'); + const isCheckedIn = format(new Date(lastCheckIn), 'yyyy-MM-dd') >= today; const handleClickContact = () => { const contactUrl = 'https://walla.my/survey/K79c5bC6alDqc1qiaaES'; @@ -78,6 +81,12 @@ export default function Header() { } }; + useEffect(() => { + if (!isLoading && !!user && !isCheckedIn) { + setOpen(true); + } + }, [isLoading, user, isCheckedIn]); + useEffect(() => { const handleClickOutside = (e: MouseEvent) => { if (headerRef.current && !headerRef.current.contains(e.target as Node)) { @@ -124,6 +133,7 @@ export default function Header() { diff --git a/apps/web/src/components/CheckInModal.tsx b/apps/web/src/components/CheckInModal.tsx index 5f2c03fa..de00e631 100644 --- a/apps/web/src/components/CheckInModal.tsx +++ b/apps/web/src/components/CheckInModal.tsx @@ -1,6 +1,5 @@ 'use client'; -import { format } from 'date-fns'; import { Clock } from 'lucide-react'; import Checked from '@/assets/lotties/Checked.json'; @@ -16,12 +15,14 @@ import ActionAnimationFlow from './ActionAnimationFlow'; interface CheckInModalProps { lastCheckIn: Date; + isCheckedIn: boolean; isLogin: boolean; handleNavigateLogin: () => void; } export default function CheckInModal({ lastCheckIn, + isCheckedIn, isLogin, handleNavigateLogin, }: CheckInModalProps) { @@ -33,10 +34,6 @@ export default function CheckInModal({ const { mutate: patchUserCheckIn } = usePatchUserCheckInMutation(); - const today = format(new Date(), 'yyyy-MM-dd'); - - const parseLastCheckIn = format(new Date(lastCheckIn), 'yyyy-MM-dd'); - const handleClickCheckIn = () => { patchUserCheckIn(); }; @@ -54,7 +51,7 @@ export default function CheckInModal({ = today ? 'DONE' : 'IDLE'} + initalStatus={isCheckedIn ? 'DONE' : 'IDLE'} // 1. 대기 화면 (trigger 함수를 받아서 버튼에 연결) idleView={trigger => (
diff --git a/apps/web/src/components/FallingIcons.tsx b/apps/web/src/components/FallingIcons.tsx index 93c274b4..61f6feda 100644 --- a/apps/web/src/components/FallingIcons.tsx +++ b/apps/web/src/components/FallingIcons.tsx @@ -154,5 +154,5 @@ export default function FallingIcons({ count }: FallingIconsProps) { } }, [count]); - return
; + return
; } From 2628da58c3037b27eddfe5fb584c45db385a1222 Mon Sep 17 00:00:00 2001 From: GulSam00 Date: Wed, 8 Apr 2026 22:08:31 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore=20:=20=ED=8F=AC=EB=A7=B7=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC=20=EB=B0=8F=20sitemap=20=EA=B0=B1=EC=8B=A0=20(#182)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/public/sitemap-0.xml | 2 +- packages/crawling/CLAUDE.md | 12 ++++++------ packages/crawling/src/utils/getSongTag.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/web/public/sitemap-0.xml b/apps/web/public/sitemap-0.xml index 87729978..b99893f4 100644 --- a/apps/web/public/sitemap-0.xml +++ b/apps/web/public/sitemap-0.xml @@ -1,4 +1,4 @@ -https://www.singcode.kr2026-04-05T15:20:24.064Zweekly0.7 +https://www.singcode.kr2026-04-08T12:54:39.507Zweekly0.7 \ No newline at end of file diff --git a/packages/crawling/CLAUDE.md b/packages/crawling/CLAUDE.md index 3bdf7d00..141d5cda 100644 --- a/packages/crawling/CLAUDE.md +++ b/packages/crawling/CLAUDE.md @@ -118,11 +118,11 @@ taggingSongs.ts ### GitHub Actions 워크플로우 -| 워크플로우 파일 | 스케줄 (UTC) | 실행 스크립트 | -| ----------------------- | ------------ | -------------------- | -| `crawl_recent_tj.yml` | 매일 14:00 | `pnpm recent-tj` | -| `tagging_song.yml` | 매일 14:00 | `pnpm tag-songs` | -| `update_ky_youtube.yml` | 수동 | `pnpm ky-youtube` | -| `verify_ky_youtube.yml` | 수동 | `pnpm ky-verify` | +| 워크플로우 파일 | 스케줄 (UTC) | 실행 스크립트 | +| ----------------------- | ------------ | ----------------- | +| `crawl_recent_tj.yml` | 매일 14:00 | `pnpm recent-tj` | +| `tagging_song.yml` | 매일 14:00 | `pnpm tag-songs` | +| `update_ky_youtube.yml` | 수동 | `pnpm ky-youtube` | +| `verify_ky_youtube.yml` | 수동 | `pnpm ky-verify` | 모든 워크플로우는 `workflow_dispatch`로 수동 실행도 가능하다. diff --git a/packages/crawling/src/utils/getSongTag.ts b/packages/crawling/src/utils/getSongTag.ts index 49998464..e9c484dd 100644 --- a/packages/crawling/src/utils/getSongTag.ts +++ b/packages/crawling/src/utils/getSongTag.ts @@ -1,5 +1,5 @@ -import OpenAI from 'openai'; import dotenv from 'dotenv'; +import OpenAI from 'openai'; import { getClient } from '@/supabase/getClient';