import { useEffect } from "react";
import { markViewed } from "../api";
import type { ScrapedPost } from "../types";
import styles from "./bbs.module.css";
// 외부 사이트 이미지는 Referer를 보고 차단하는 경우가 많음 → 안 보내기. 본문 링크는 새 탭으로
const prepare = (html: string) =>
html
.replaceAll(" {
if (post) markViewed(token, post.id).catch(() => {}); // 실패해도 읽기엔 지장 없음
}, [token, post]);
if (!post) {
return (