1+ import cx from 'classnames'
12import React , { useCallback } from 'react'
23
34import { useVaultClient } from 'cozy-keys-lib'
45import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
56
7+ import styles from '@/styles/folder-view.styl'
8+
69import { EmptyDrive } from '@/components/Error/Empty'
710import Oops from '@/components/Error/Oops'
811import { useThumbnailSizeContext } from '@/lib/ThumbnailSizeContext'
@@ -91,8 +94,15 @@ const FolderBody = ({
9194 />
9295 ) : null }
9396 < FileListBody selectionModeActive = { false } >
94- { ! needsToWait && (
95- < div className = { ! isDesktop ? 'u-ov-hidden' : '' } >
97+ { ! hasData && ! needsToWait && (
98+ < div
99+ className = { cx (
100+ viewType === 'grid' ? styles [ 'fil-folder-body-grid' ] : '' ,
101+ {
102+ 'u-ov-hidden' : ! isDesktop
103+ }
104+ ) }
105+ >
96106 < AddFolder
97107 vaultClient = { vaultClient }
98108 refreshFolderContent = { refreshFolderContent }
@@ -106,7 +116,21 @@ const FolderBody = ({
106116 { isLoading || needsToWait ? < FileListRowsPlaceholder /> : null }
107117 { isEmpty ? renderEmptyComponent ( ) : null }
108118 { hasData && ! needsToWait ? (
109- < div className = { ! isDesktop ? 'u-ov-hidden' : '' } >
119+ < div
120+ className = { cx (
121+ viewType === 'grid' ? styles [ 'fil-folder-body-grid' ] : '' ,
122+ {
123+ 'u-ov-hidden' : ! isDesktop
124+ }
125+ ) }
126+ >
127+ < AddFolder
128+ vaultClient = { vaultClient }
129+ refreshFolderContent = { refreshFolderContent }
130+ extraColumns = { extraColumns }
131+ currentFolderId = { folderId }
132+ driveId = { driveId }
133+ />
110134 { queryResults . map ( ( query , queryIndex ) => (
111135 < React . Fragment key = { queryIndex } >
112136 { query . data . map ( file => {
0 commit comments