This repository has no description
0

Configure Feed

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

feat: remove card button on semble page

+24 -1
+1
.gitignore
··· 11 11 storybook-static 12 12 src/webapp/tsconfig.tsbuildinfo 13 13 src/webapp/next-env.d.ts 14 + src/webapp/next-env.d.ts
+21
src/webapp/features/semble/components/sembleActions/SembleActions.tsx
··· 1 1 'use client'; 2 2 3 3 import AddCardToModal from '@/features/cards/components/addCardToModal/AddCardToModal'; 4 + import RemoveCardFromLibraryModal from '@/features/cards/components/removeCardFromLibraryModal/RemoveCardFromLibraryModal'; 4 5 import useGetCardFromMyLibrary from '@/features/cards/lib/queries/useGetCardFromMyLibrary'; 5 6 import { ActionIcon, Button, CopyButton, Group, Tooltip } from '@mantine/core'; 6 7 import { notifications } from '@mantine/notifications'; ··· 14 15 import { usePathname } from 'next/navigation'; 15 16 import { TbPlugConnected } from 'react-icons/tb'; 16 17 import AddConnectionModal from '@/features/connections/components/addConnectionModal/AddConnectionModal'; 18 + import { BsTrash2Fill } from 'react-icons/bs'; 17 19 18 20 interface Props { 19 21 url: string; ··· 26 28 const isInYourLibrary = cardStatus.data.card?.urlInLibrary; 27 29 const [showAddToModal, setShowAddToModal] = useState(false); 28 30 const [showAddConnectionModal, setShowAddConnectionModal] = useState(false); 31 + const [showRemoveModal, setShowRemoveModal] = useState(false); 29 32 30 33 const { data } = useSembleLibraries({ url: props.url }); 31 34 const allLibraries = ··· 96 99 > 97 100 {isInYourLibrary ? 'Update' : 'Add'} 98 101 </Button> 102 + {isInYourLibrary && ( 103 + <ActionIcon 104 + variant="light" 105 + color="red" 106 + size={36} 107 + radius={'xl'} 108 + onClick={() => setShowRemoveModal(true)} 109 + > 110 + <BsTrash2Fill /> 111 + </ActionIcon> 112 + )} 99 113 </Group> 100 114 101 115 <AddConnectionModal ··· 119 133 pagePath: pathname, 120 134 }} 121 135 /> 136 + {isInYourLibrary && cardStatus.data.card?.id && ( 137 + <RemoveCardFromLibraryModal 138 + isOpen={showRemoveModal} 139 + onClose={() => setShowRemoveModal(false)} 140 + cardId={cardStatus.data.card.id} 141 + /> 142 + )} 122 143 </Fragment> 123 144 ); 124 145 }
+1
src/webapp/features/semble/containers/sembleActionsContainer/Skeleton.SembleActionsContainer.tsx
··· 7 7 <Skeleton w={36} h={36} circle /> 8 8 <Skeleton w={114} h={36} radius="xl" /> 9 9 <Skeleton w={113} h={36} radius="xl" /> 10 + <Skeleton w={36} h={36} circle /> 10 11 </Group> 11 12 </Stack> 12 13 );
+1 -1
src/webapp/next-env.d.ts
··· 1 1 /// <reference types="next" /> 2 2 /// <reference types="next/image-types/global" /> 3 - import "./.next/types/routes.d.ts"; 3 + import "./.next/dev/types/routes.d.ts"; 4 4 5 5 // NOTE: This file should not be edited 6 6 // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.