MCPcopy Create free account
hub / github.com/dailydotdev/apps / PlusList

Function PlusList

packages/shared/src/components/plus/PlusList.tsx:317–361  ·  view source on GitHub ↗
({
  className,
  items = plusFeatureList,
  ...props
}: PlusListProps & WithClassNameProps)

Source from the content-addressed store, hash-verified

315);
316
317export const PlusList = ({
318 className,
319 items = plusFeatureList,
320 ...props
321}: PlusListProps & WithClassNameProps): ReactElement => {
322 const { logEvent } = useLogContext();
323
324 const handleItemHover = (item: PlusItem) => {
325 logEvent({
326 event_name: LogEvent.HoverPlusFeature,
327 target_id: item.id,
328 target_type: TargetType.List,
329 });
330 };
331
332 const handleItemClick = (item: PlusItem) => {
333 logEvent({
334 event_name: LogEvent.ClickPlusFeature,
335 target_id: item.id,
336 target_type: TargetType.List,
337 });
338 };
339
340 return (
341 <ul className={classNames('flex flex-col gap-0.5 py-6', className)}>
342 {items.map((item) => (
343 <PlusListItem
344 key={item.label}
345 item={item}
346 typographyProps={item.typographyProps}
347 onHover={() => handleItemHover(item)}
348 {...props}
349 onClick={
350 item.href
351 ? () => {
352 handleItemClick(item);
353 props.onClick?.();
354 }
355 : props.onClick
356 }
357 />
358 ))}
359 </ul>
360 );
361};

Callers

nothing calls this directly

Calls 3

useLogContextFunction · 0.90
handleItemHoverFunction · 0.85
handleItemClickFunction · 0.85

Tested by

no test coverage detected