MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / CollectionListItem

Function CollectionListItem

frontend/src/components/commonUI/Drawer.tsx:23–51  ·  view source on GitHub ↗
({
  collection,
  onNavigate,
}: { collection: Collection; onNavigate: () => void })

Source from the content-addressed store, hash-verified

21import LanguageSelector from './LanguageSelector'
22
23function CollectionListItem({
24 collection,
25 onNavigate,
26}: { collection: Collection; onNavigate: () => void }) {
27 return (
28 <List.Item
29 key={collection.id}
30 display="flex"
31 alignItems="center"
32 px={3}
33 py={2}
34 borderRadius="lg"
35 transition="all 0.4s"
36 _hover={{ bg: 'bg.100' }}
37 _active={{ bg: 'bg.100' }}
38 >
39 <Link
40 to="/collections/$collectionId"
41 params={{ collectionId: collection.id }}
42 onClick={onNavigate}
43 style={{ width: '100%' }}
44 >
45 <Text fontSize="15px" color="fg.DEFAULT" truncate>
46 {collection.name}
47 </Text>
48 </Link>
49 </List.Item>
50 )
51}
52
53function Drawer({ isOpen, setIsOpen }: { isOpen: boolean; setIsOpen: (open: boolean) => void }) {
54 const { t } = useTranslation()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected