This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

feat: connect button on collection header

+25
+24
src/webapp/features/collections/components/collectionActions/CollectionActions.tsx
··· 16 16 import useSembleLibraries from '@/features/semble/lib/queries/useSembleLibraries'; 17 17 import { IoMdCheckmark } from 'react-icons/io'; 18 18 import { FaRegNoteSticky } from 'react-icons/fa6'; 19 + import { TbPlugConnected } from 'react-icons/tb'; 20 + import AddConnectionModal from '@/features/connections/components/addConnectionModal/AddConnectionModal'; 19 21 20 22 interface Props { 21 23 collection: Collection & { ··· 29 31 const [showDeleteModal, setShowDeleteModal] = useState(false); 30 32 const [showAddDrawer, setShowAddDrawer] = useState(false); 31 33 const [showSaveToLibraryModal, setShowSaveToLibraryModal] = useState(false); 34 + const [showAddConnectionModal, setShowAddConnectionModal] = useState(false); 32 35 const { trigger } = useWebHaptics(); 33 36 34 37 const isAuthor = user?.handle === props.collection.author?.handle; ··· 82 85 </Menu> 83 86 )} 84 87 88 + {isAuthenticated && ( 89 + <ActionIcon 90 + variant="light" 91 + color="green" 92 + size="lg" 93 + radius={'xl'} 94 + onClick={() => { 95 + trigger(); 96 + setShowAddConnectionModal(true); 97 + }} 98 + > 99 + <TbPlugConnected size={18} /> 100 + </ActionIcon> 101 + )} 102 + 85 103 {isAuthenticated && !isAuthor && ( 86 104 <FollowButton 87 105 targetId={props.collection.id} ··· 143 161 </Menu> 144 162 )} 145 163 </Group> 164 + 165 + <AddConnectionModal 166 + isOpen={showAddConnectionModal} 167 + onClose={() => setShowAddConnectionModal(false)} 168 + sourceUrl={collectionPageUrl} 169 + /> 146 170 147 171 <AddCardToModal 148 172 isOpen={showSaveToLibraryModal}
+1
src/webapp/features/collections/components/collectionActions/Skeleton.CollectionActions.tsx
··· 6 6 <Skeleton w={34} h={34} radius={'xl'} /> 7 7 <Skeleton w={34} h={34} radius={'xl'} /> 8 8 <Skeleton w={34} h={34} radius={'xl'} /> 9 + <Skeleton w={34} h={34} radius={'xl'} /> 9 10 </Group> 10 11 ); 11 12 }