fix: 각 탭 1~3위 양옆 카드 높이를 같게(이름이 두 줄이면 2위만 커지던 것), 배포 때 피드 캐시 비움(오늘 탭 순위가 옛 규칙으로 남던 것)

This commit is contained in:
minaChoi committed 2026-10-13 11:21:04 +09:00
1 parent 18a7cffb39
commit 29700f9d76
2 files changed
+8 -6

No files matched your search

+2
View File
@@ -19,6 +19,8 @@ docker compose up -d --wait postgres redis
docker compose exec -T postgres psql -q -v ON_ERROR_STOP=1 -U "$DB_USER" -d "$DB_NAME" < backend/postgres-init/init.sql
docker compose up -d --build backend worker frontend
docker compose exec -T backend python scripts/load_seed.py
# 피드 캐시는 최대 1시간이라, 각 규칙이 바뀌어도 오늘 탭만 옛 순위로 남는다
docker compose exec -T redis sh -c "redis-cli --scan --pattern 'feed:*' | xargs -r redis-cli del" >/dev/null
if [ "${1:-}" = "--restore-db" ]; then
dump="${2:?덤프 파일 경로가 필요합니다}"
+6 -6
View File
@@ -27,11 +27,11 @@ const GRID_SKELS = Array.from({ length: 9 }, (_, i) => i)
/** 1~3위 받침대와 같은 칸(가운데가 높은 3칸)의 스켈레톤 */
function PodiumSkel() {
return (
<div className="grid grid-cols-[1fr_1.15fr_1fr] items-end gap-1.5 px-3 pt-3" aria-hidden="true">
<div className="grid grid-cols-[1fr_1.15fr_1fr] gap-1.5 px-3 pt-3" aria-hidden="true">
{[1, 0, 2].map((k) => (
<span key={k} className={cx('flex flex-col items-center rounded-3xl bg-white px-1.5 text-center shadow-[inset_0_-6px_0_var(--shade)]', k === 0 ? 'py-4' : 'py-3')}>
<span key={k} className={cx('flex flex-col items-center rounded-3xl bg-white px-1.5 text-center shadow-[inset_0_-6px_0_var(--shade)]', k === 0 ? 'py-4' : 'mt-6 py-3')}>
<Skel shape className={cx('aspect-square rounded-full', k === 0 ? 'w-20' : 'w-[62px]')} />
<b className="mt-1.5 font-jua text-base font-normal">
<b className="mt-1.5 flex flex-1 items-center font-jua text-base font-normal">
<Skel className="w-16" />
</b>
<em className="font-bagel text-[30px] leading-[1.05] not-italic">
@@ -91,7 +91,7 @@ export function GakPage() {
<StateBox load={load} onRetry={() => q.refetch()} empty="오늘 1~3위를 아직 못 정했어요." hold={<PodiumSkel />} className="inset-x-3 top-3 bottom-0" />
)
) : (
<div className={cx('grid grid-cols-[1fr_1.15fr_1fr] items-end gap-1.5 px-3 pt-3 transition-opacity', q.isPlaceholderData && 'opacity-60')}>
<div className={cx('grid grid-cols-[1fr_1.15fr_1fr] gap-1.5 px-3 pt-3 transition-opacity', q.isPlaceholderData && 'opacity-60')}>
{[1, 0, 2].map((k) => {
const g = top[k]
return (
@@ -99,13 +99,13 @@ export function GakPage() {
key={g.index_id}
type="button"
onClick={() => open({ type: 'gak', indexId: g.index_id })}
className={cx('flex cursor-pointer flex-col items-center rounded-3xl px-1.5 text-center shadow-[inset_0_-6px_0_var(--shade)]', k === 0 ? 'bg-[linear-gradient(180deg,#fff1c4,#fff)] py-4' : 'bg-white py-3')}
className={cx('flex cursor-pointer flex-col items-center rounded-3xl px-1.5 text-center shadow-[inset_0_-6px_0_var(--shade)]', k === 0 ? 'bg-[linear-gradient(180deg,#fff1c4,#fff)] py-4' : 'mt-6 bg-white py-3')}
>
<span className="relative">
<Ic name={g.icon} className={cx('drop-shadow-[0_10px_12px_rgb(40_48_74/0.15)]', k === 0 ? 'w-20' : 'w-[62px]')} />
<Ic name={MEDALS[k]} className="absolute -top-1.5 -left-3 w-7" />
</span>
<b className="mt-1.5 font-jua text-base font-normal">
<b className="mt-1.5 flex flex-1 items-center font-jua text-base font-normal">
{k + 1}위 {g.name}
</b>
<em className="font-bagel text-[30px] leading-[1.05] text-(--orange) not-italic">{g.score}</em>