MCPcopy
hub / github.com/linkwarden/linkwarden / setCollection

Function setCollection

apps/web/components/ModalContent/NewLinkModal.tsx:48–54  ·  view source on GitHub ↗
(e: any)

Source from the content-addressed store, hash-verified

46 const { data: collections = [] } = useCollections();
47
48 const setCollection = (e: any) => {
49 if (e?.__isNew__) e.value = undefined;
50 setLink({
51 ...link,
52 collection: { id: e?.value, name: e?.label },
53 });
54 };
55
56 const setTags = (selectedOptions: any = []) => {
57 const tagNames = selectedOptions.map((option: any) => ({

Callers 7

EditCollectionModalFunction · 0.70
NewCollectionModalFunction · 0.70
setMemberStateFunction · 0.70
handleRoleChangeFunction · 0.70
DeleteCollectionModalFunction · 0.70
PreservationNavbarFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected