fix: cleanup

This commit is contained in:
2026-06-04 06:42:27 -05:00
parent f989b144cf
commit 654cfec147
52 changed files with 290 additions and 540 deletions
@@ -0,0 +1,20 @@
import { useTranslation } from "react-i18n-lite";
interface MarkerPassageActionsProps {
onGoToPassage: () => void;
onDelete: () => void;
}
export function MarkerPassageActions({ onGoToPassage, onDelete }: MarkerPassageActionsProps) {
const { t } = useTranslation();
return (
<div className="annotation-actions">
<button type="button" className="btn btn-sm" onClick={onGoToPassage}>
{t("annotations.goToPassage")}
</button>
<button type="button" className="btn btn-sm btn-danger" onClick={onDelete}>
{t("common.delete")}
</button>
</div>
);
}
@@ -6,6 +6,7 @@ import {
CollapsibleMarkerPassage,
CollapsibleMarkerThought,
} from "@/components/annotations/CollapsibleMarkerText";
import { MarkerPassageActions } from "@/components/annotations/MarkerPassageActions";
interface MarkerThreadsViewProps {
ebookIdFilter?: string;
@@ -91,22 +92,10 @@ export function MarkerThreadsView({
) : (
<span className="annotation-kind-badge bookmark-badge">{t("annotations.bookmarkOnly")}</span>
)}
<div className="annotation-actions">
<button
type="button"
className="btn btn-sm"
onClick={() => onGoToPassage(m.ebook_id, m.epub_cfi)}
>
{t("annotations.goToPassage")}
</button>
<button
type="button"
className="btn btn-sm btn-danger"
onClick={() => removeBookmark(m.id)}
>
{t("common.delete")}
</button>
</div>
<MarkerPassageActions
onGoToPassage={() => onGoToPassage(m.ebook_id, m.epub_cfi)}
onDelete={() => removeBookmark(m.id)}
/>
</li>
))}
</ul>
@@ -1,2 +0,0 @@
export { BookmarksNotesPage } from "./BookmarksNotesPage";
export { MarkerThreadsView } from "./MarkerThreadsView";