import { useSearchImageContext } from "@contexts/SearchImageContext"; import { useParams } from "@solidjs/router"; import { Component, For, Show, createSignal } from "solid-js"; import { base } from "../../network"; import { Dialog } from "@kobalte/core"; const DeleteButton: Component<{ onDelete: () => void }> = (props) => { const [isOpen, setIsOpen] = createSignal(false); return ( <> setIsOpen(true)} > × Confirm Delete Are you sure you want to delete this image from this list? Cancel Confirm > ); }; export const List: Component = () => { const { listId } = useParams(); const { lists, onDeleteImageFromStack } = useSearchImageContext(); const list = () => lists().find((l) => l.ID === listId); return ( {(l) => ( Image {(item, index) => ( {item.Item} )} {(image, rowIndex) => ( onDeleteImageFromStack(l().ID, image.ImageID)} /> {(item, colIndex) => ( {item.Value} )} )} No images in this list yet Images will appear here once added to the list )} ); };
No images in this list yet
Images will appear here once added to the list