fix: 뉴스 페이지네이션 리셋 버그 + 상세 링크 새 탭
- $effect에서 필터 변경 시에만 page 리셋 (페이지 클릭과 충돌 방지) - 상세 링크 → 새 탭으로 열기 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -105,11 +105,15 @@
|
||||
return `${days}일 전`;
|
||||
}
|
||||
|
||||
// 필터 변경 시에만 1페이지 리셋
|
||||
let prevFilter = '';
|
||||
$effect(() => {
|
||||
const _s = filterSource;
|
||||
const _u = showUnreadOnly;
|
||||
currentPage = 1;
|
||||
loadArticles();
|
||||
const key = `${filterSource}|${showUnreadOnly}`;
|
||||
if (key !== prevFilter) {
|
||||
prevFilter = key;
|
||||
currentPage = 1;
|
||||
loadArticles();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -224,7 +228,8 @@
|
||||
<a
|
||||
href="/documents/{selectedArticle.id}"
|
||||
class="text-xs text-[var(--text-dim)] hover:text-[var(--text)]"
|
||||
>상세</a>
|
||||
target="_blank"
|
||||
>문서 상세 ↗</a>
|
||||
<button
|
||||
onclick={() => selectedArticle = null}
|
||||
class="text-xs text-[var(--text-dim)] hover:text-[var(--text)]"
|
||||
|
||||
Reference in New Issue
Block a user