diff --git a/client/src/components/ConversationPreferences.tsx b/client/src/components/ConversationPreferences.tsx index 05268bcbdc75b43cf32472dc6977db22682bfe2f..54f263124d4253977dfac0ccdfe13acac75becc8 100644 --- a/client/src/components/ConversationPreferences.tsx +++ b/client/src/components/ConversationPreferences.tsx @@ -31,6 +31,7 @@ import { Input, Popper, Switch, + Typography, useMediaQuery, useTheme, } from '@mui/material' @@ -555,7 +556,7 @@ const Files = () => { const { conversationId } = useConversationContext() const filesQuery = useGetAllFilesQuery(conversationId) const files = filesQuery.data - + const { t } = useTranslation() const theme = useTheme() const isMobile = useMediaQuery(theme.breakpoints.only('xs')) @@ -563,6 +564,14 @@ const Files = () => { ;<ProcessingRequest open={true} /> } + if (filesQuery.isSuccess && files.length === 0) { + return ( + <Box> + <Typography>{t('no_files_found')}</Typography> + </Box> + ) + } + return ( <Box sx={{ diff --git a/server/locale/en/translation.json b/server/locale/en/translation.json index 018aca38048bb9a6fba74290d7cb295897e51f32..38103930d269499a44c07755cc315c2ebce3c57d 100644 --- a/server/locale/en/translation.json +++ b/server/locale/en/translation.json @@ -199,6 +199,7 @@ "mute_conversation": "Mute conversation", "nameserver_already_set": "The name server is already set.", "next": "Next", + "no_files_found": "No files yet.", "ongoing_call_muted": "Ongoing call (muted)", "ongoing_call_unmuted": "Ongoing call", "openid": "OpenID",