Skip to content

Commit

Permalink
fix(FolderPicker): Display correct name for Nextcloud folder
Browse files Browse the repository at this point in the history
  • Loading branch information
cballevre committed Oct 25, 2024
1 parent 6b4aafd commit c7ae333
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/FolderPicker/FolderPickerListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'

import type { File } from 'components/FolderPicker/types'
import { getFileNameAndExtension } from 'modules/filelist/helpers'
import FileThumbnail from 'modules/filelist/icons/FileThumbnail'

import styles from 'styles/folder-picker.styl'
Expand Down Expand Up @@ -43,6 +44,8 @@ const FolderPickerListItem: FC<FolderPickerListItemProps> = ({
? `${formattedUpdatedAt}${formattedSize ? ` - ${formattedSize}` : ''}`
: undefined

const { title } = getFileNameAndExtension(file, t)

return (
<>
<ListItem
Expand All @@ -62,7 +65,7 @@ const FolderPickerListItem: FC<FolderPickerListItemProps> = ({
}}
/>
</ListItemIcon>
<ListItemText primary={file.name} secondary={secondaryText} />
<ListItemText primary={title} secondary={secondaryText} />
</ListItem>
{showDivider && <Divider />}
</>
Expand Down

0 comments on commit c7ae333

Please sign in to comment.