2023-12-21 04:08:56 -06:00
|
|
|
import LinkList from "@/components/LinkViews/LinkList";
|
2023-12-15 21:25:39 -06:00
|
|
|
import { LinkIncludingShortenedCollectionAndTags } from "@/types/global";
|
|
|
|
|
|
|
|
export default function ListView({
|
|
|
|
links,
|
2024-02-10 18:34:25 -06:00
|
|
|
showCheckbox = true,
|
2024-02-11 01:29:11 -06:00
|
|
|
editMode,
|
2023-12-15 21:25:39 -06:00
|
|
|
}: {
|
|
|
|
links: LinkIncludingShortenedCollectionAndTags[];
|
2024-02-10 00:37:48 -06:00
|
|
|
showCheckbox?: boolean;
|
2024-02-10 23:55:00 -06:00
|
|
|
editMode?: boolean;
|
2023-12-15 21:25:39 -06:00
|
|
|
}) {
|
|
|
|
return (
|
2023-12-16 14:06:26 -06:00
|
|
|
<div className="flex flex-col">
|
|
|
|
{links.map((e, i) => {
|
2024-01-19 23:34:49 -06:00
|
|
|
return (
|
|
|
|
<LinkList
|
|
|
|
key={i}
|
|
|
|
link={e}
|
|
|
|
count={i}
|
2024-02-10 00:37:48 -06:00
|
|
|
showCheckbox={showCheckbox}
|
2024-01-19 23:34:49 -06:00
|
|
|
flipDropdown={i === links.length - 1}
|
2024-02-10 23:55:00 -06:00
|
|
|
editMode={editMode}
|
2024-01-19 23:34:49 -06:00
|
|
|
/>
|
|
|
|
);
|
2023-12-16 14:06:26 -06:00
|
|
|
})}
|
2023-12-15 21:25:39 -06:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|