[BUG] "No Threads" not shown when there is no thread present
Spiral-Memory opened this issue · comments
Description:
In the case of the thread sidebar, the "No Threads Found" message is not shown when there are no threads in the chat.
Steps to reproduce:
- Set up the Embedded Chat App.
- Delete all threads from the channel.
- Open the thread menu and observe that it will be empty, but no information is displayed.
Expected behavior:
The "No threads found" message with an icon must be shown to indicate it instead of a white background.
Acceptance criteria
[x] Icon and "No thread found" should be displayed even in the case when there are no threads.
[x] It must not break any existing functionality and not introduce any bugs.
Actual behavior:
2024-03-22.21-21-01.mp4
Note: The icon and message are already in place. If you search for a thread and it is not found, then that information will be displayed because while rendering, it only checks if filteredMessage has a length of 0 or not. Make sure that it also renders when there are no threads in the channel.
Any new contributor seeking an issue to work on, please feel free to raise a PR for this issue.
File: "Allthreads.js"
Code to inspect:
{filteredThreads.length === 0 ? (
<Box
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
color: '#4a4a4a',
}}
>
<Icon name="magnifier" size="3rem" style={{ padding: '0.5rem' }} />
<span style={{ fontSize: '1.2rem', fontWeight: 'bold' }}>
No threads found
</span>
</Box>
) .....