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

Function Channel

apps/web/ui/ChannelView/ForumView/index.tsx:143–618  ·  view source on GitHub ↗
({
  threads,
  pinnedThreads,
  currentChannel,
  currentCommunity,
  settings,
  channelName,
  isSubDomainRouting,
  nextCursor,
  token,
  permissions,
  currentThreadId,
  pathCursor,
  setThreads,
  deleteMessage,
  editThread,
  muteThread,
  unmuteThread,
  pinThread,
  starThread,
  updateThreadResolution,
  readThread,
  unreadThread,
  editMessage,
  onMessage,
  onDrop,
  onShare,
  onRemind,
  onSelectThread,
  updateThread,
  sendReaction,
  useUsersContext,
  usePath,
  routerPush,
  api,
  startSignUp,
  activeUsers,
}: Props)

Source from the content-addressed store, hash-verified

141}
142
143export default function Channel({
144 threads,
145 pinnedThreads,
146 currentChannel,
147 currentCommunity,
148 settings,
149 channelName,
150 isSubDomainRouting,
151 nextCursor,
152 token,
153 permissions,
154 currentThreadId,
155 pathCursor,
156 setThreads,
157 deleteMessage,
158 editThread,
159 muteThread,
160 unmuteThread,
161 pinThread,
162 starThread,
163 updateThreadResolution,
164 readThread,
165 unreadThread,
166 editMessage,
167 onMessage,
168 onDrop,
169 onShare,
170 onRemind,
171 onSelectThread,
172 updateThread,
173 sendReaction,
174 useUsersContext,
175 usePath,
176 routerPush,
177 api,
178 startSignUp,
179 activeUsers,
180}: Props) {
181 const [collapsed, setCollapsed] = useState(false);
182 const [isInfiniteScrollLoading, setInfiniteScrollLoading] = useState(false);
183 const [isScrolling, setIsScrolling] = useState(true);
184 const [readStatus, setReadStatus] = useState<SerializedReadStatus>();
185 const scrollableRootRef = useRef<HTMLDivElement | null>(null);
186 const rightRef = useRef<HTMLDivElement>(null);
187 const leftBottomRef = useRef<HTMLDivElement>(null);
188 const [cursor, setCursor] = useState(nextCursor);
189 const [error, setError] = useState<{ prev?: unknown; next?: unknown }>();
190 const [progress, setProgress] = useState(0);
191 const [uploading, setUploading] = useState(false);
192 const [uploads, setUploads] = useState<UploadedFile[]>([]);
193 const [allUsers] = useUsersContext();
194 const { mode } = useMode();
195 const [editedMessage, setEditedMessage] = useState<SerializedMessage>();
196 const [editedThread, setEditedThread] = useState<SerializedThread>();
197 const [modal, setModal] = useState<ModalView>(ModalView.NONE);
198 const membersPath = usePath({ href: '/members' });
199 const viewport = useViewport();
200

Callers

nothing calls this directly

Calls 15

useViewportFunction · 0.90
timestampFunction · 0.90
createMessageWrapperFunction · 0.90
useUsersContextFunction · 0.85
useModeFunction · 0.85
usePathFunction · 0.85
debounceFunction · 0.85
onSelectThreadFunction · 0.85
uploadFilesFunction · 0.70
selectThreadFunction · 0.70
isPaginationViewFunction · 0.70
handleScrollFunction · 0.70

Tested by

no test coverage detected