MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / Navigation

Function Navigation

apps/web/ui/Thread/Header/index.tsx:22–52  ·  view source on GitHub ↗
({
  breadcrumb,
  onClose,
  onExpandClick,
}: {
  breadcrumb?: React.ReactNode;
  onClose?(): void;
  onExpandClick?(): void;
})

Source from the content-addressed store, hash-verified

20}
21
22function Navigation({
23 breadcrumb,
24 onClose,
25 onExpandClick,
26}: {
27 breadcrumb?: React.ReactNode;
28 onClose?(): void;
29 onExpandClick?(): void;
30}) {
31 if (breadcrumb) {
32 return <>{breadcrumb}</>;
33 }
34 return (
35 <>
36 {onClose && (
37 <div className={classNames({ [styles.mobile]: !!onExpandClick })}>
38 <Icon onClick={onClose}>
39 <FiChevronLeft />
40 </Icon>
41 </div>
42 )}
43 {onExpandClick && (
44 <div className={styles.desktop}>
45 <Icon className={styles.expand} onClick={onExpandClick}>
46 <FiChevronLeft />
47 </Icon>
48 </div>
49 )}
50 </>
51 );
52}
53
54export default function Header({
55 thread,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected