Skip to content

Commit

Permalink
Merge pull request #535 from fairDataSociety/fix/322
Browse files Browse the repository at this point in the history
fix: spinner margin (#322)
  • Loading branch information
tomicvladan authored Oct 4, 2023
2 parents 1d5575a + ef4b480 commit d095dd2
Showing 1 changed file with 38 additions and 35 deletions.
73 changes: 38 additions & 35 deletions src/pages/drive/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,42 +270,45 @@ const Drive: FC = () => {
) : null}
<Spinner isLoading={loading || !pods} />

{!loading &&
(activePod ? (
directories?.length || files?.length ? (
<div>
{driveView === 'grid' ? (
<DriveGridView
directories={handleSort(
directories?.filter(handleSearchFilter)
)}
files={handleSort(files?.filter(handleSearchFilter))}
directoryOnClick={handleDirectoryOnClick}
fileOnClick={handleFileOnClick}
updateDrive={handleUpdateDrive}
/>
) : null}

{driveView === 'list' ? (
<DriveListView
directories={handleSort(
directories?.filter(handleSearchFilter)
)}
files={handleSort(files?.filter(handleSearchFilter))}
directoryOnClick={handleDirectoryOnClick}
fileOnClick={handleFileOnClick}
updateDrive={handleUpdateDrive}
/>
) : null}
</div>
{!loading && (
<div style={{ marginTop: 15 }}>
{activePod ? (
directories?.length || files?.length ? (
<div>
{driveView === 'grid' ? (
<DriveGridView
directories={handleSort(
directories?.filter(handleSearchFilter)
)}
files={handleSort(files?.filter(handleSearchFilter))}
directoryOnClick={handleDirectoryOnClick}
fileOnClick={handleFileOnClick}
updateDrive={handleUpdateDrive}
/>
) : null}

{driveView === 'list' ? (
<DriveListView
directories={handleSort(
directories?.filter(handleSearchFilter)
)}
files={handleSort(files?.filter(handleSearchFilter))}
directoryOnClick={handleDirectoryOnClick}
fileOnClick={handleFileOnClick}
updateDrive={handleUpdateDrive}
/>
) : null}
</div>
) : (
<EmptyDirectoryCard
onUploadClick={() => setShowUploadFileModal(true)}
/>
)
) : (
<EmptyDirectoryCard
onUploadClick={() => setShowUploadFileModal(true)}
/>
)
) : (
<PodList pods={pods} onPodSelect={handlePodSelect} />
))}
<PodList pods={pods} onPodSelect={handlePodSelect} />
)}
</div>
)}
{showUploadFileModal && (
<UploadFileModal
showModal={showUploadFileModal}
Expand Down

0 comments on commit d095dd2

Please sign in to comment.