fix
This commit is contained in:
@@ -6,7 +6,6 @@ interface SidebarProps {
|
||||
selectedId: string | null;
|
||||
onSelect: (id: string) => void;
|
||||
onNewClick: () => void;
|
||||
onDelete?: (id: string) => void;
|
||||
}
|
||||
|
||||
function statusIcon(status: RecommendationSummary['status']): string {
|
||||
@@ -27,7 +26,7 @@ function statusClass(status: RecommendationSummary['status']): string {
|
||||
}
|
||||
}
|
||||
|
||||
export function Sidebar({ list, selectedId, onSelect, onNewClick, onDelete }: SidebarProps) {
|
||||
export function Sidebar({ list, selectedId, onSelect, onNewClick }: SidebarProps) {
|
||||
return (
|
||||
<aside class="sidebar">
|
||||
<div class="sidebar-header">
|
||||
@@ -57,13 +56,6 @@ export function Sidebar({ list, selectedId, onSelect, onNewClick, onDelete }: Si
|
||||
<span class={`sidebar-type-badge sidebar-type-${item.media_type}`}>
|
||||
{item.media_type === 'movie' ? 'Film' : 'TV'}
|
||||
</span>
|
||||
{onDelete && (
|
||||
<button
|
||||
class="sidebar-item-delete"
|
||||
onClick={(e) => { e.stopPropagation(); onDelete(item.id); }}
|
||||
title="Delete"
|
||||
>×</button>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
@@ -114,11 +114,6 @@ export function Recom({ id }: RecomProps) {
|
||||
setRec((prev) => (prev ? { ...prev, status: 'pending' as const } : null));
|
||||
};
|
||||
|
||||
const handleDelete = async (sid: string) => {
|
||||
await deleteRec(sid);
|
||||
if (sid === id) route('/');
|
||||
};
|
||||
|
||||
const handleCreateNew = async (body: {
|
||||
main_prompt: string;
|
||||
liked_shows: string;
|
||||
@@ -142,7 +137,6 @@ export function Recom({ id }: RecomProps) {
|
||||
selectedId={id}
|
||||
onSelect={(sid) => route(`/recom/${sid}`)}
|
||||
onNewClick={() => setShowModal(true)}
|
||||
onDelete={handleDelete}
|
||||
/>
|
||||
|
||||
<main class="main-content">
|
||||
|
||||
Reference in New Issue
Block a user