Skip to content
Snippets Groups Projects
Commit 71f74f58 authored by Léopold Chappuis's avatar Léopold Chappuis Committed by Adrien Béraud
Browse files

conversation-preferences: display message when no file is uploaded

Change-Id: Idb40dde8c2108743b24c4d16d88a2a7f789e06ad
parent bc9a9ce0
No related branches found
No related tags found
No related merge requests found
......@@ -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={{
......
......@@ -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",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment