MCPcopy Create free account
hub / github.com/electric-sql/electric / MainThread

Function MainThread

examples/burn/assets/src/components/MainThread.tsx:22–52  ·  view source on GitHub ↗
({ threadId }: Props)

Source from the content-addressed store, hash-verified

20}
21
22function MainThread({ threadId }: Props) {
23 const classes = useClasses()
24 const [isEditing, setIsEditing] = useState(false)
25
26 return (
27 <Flex direction="column" height="100%">
28 {isEditing ? (
29 <>
30 <Box>
31 <ThreadEditTopBar onClose={() => setIsEditing(false)} />
32 </Box>
33 <Box className={classes.content}>
34 <ThreadEditForm threadId={threadId} />
35 </Box>
36 </>
37 ) : (
38 <>
39 <Box>
40 <ThreadTopBar
41 threadId={threadId}
42 onEditClick={() => setIsEditing(true)}
43 />
44 </Box>
45 <Box className={classes.content}>
46 <ChatArea threadId={threadId} />
47 </Box>
48 </>
49 )}
50 </Flex>
51 )
52}
53
54export default MainThread

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected