({ threadId }: Props)
| 20 | } |
| 21 | |
| 22 | function 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 | |
| 54 | export default MainThread |
nothing calls this directly
no outgoing calls
no test coverage detected