Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/files/FilesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,14 @@ const FilesPage = ({
, [files?.content, files?.pins, selected])

if (!files || files.type === 'file') return null

// if file not found
if (files.type === 'not-found') {
return <FileNotFound path={files.path} />
}
// Don't render stale content during navigation
if (files.path && filesPathInfo.path && files.path !== filesPathInfo.path) {
return null
}

if (files.type === 'unknown') {
const path = files.path

Expand All @@ -214,10 +216,6 @@ const FilesPage = ({
</div>
)
}
if (files.type === 'not-found') {
return <FileNotFound path={files.path} />
}

const commonProps = {
updateSorting: doFilesUpdateSorting,
files: files.content || [],
Expand Down
4 changes: 2 additions & 2 deletions src/files/header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ class Header extends React.Component {
} = this.props

const pinsInQueue = pendingPins.length + failedPins.length + completedPins.length

const filefound = files && files.type !== 'not-found'
return (
<div className='db flex-l justify-between items-center mb3'>
<div className='flex items-center w-100 justify-between mr3'>
<div className='breadheader overflow-hidden mr1'>
<Breadcrumbs className="joyride-files-breadcrumbs" path={files ? files.path : '/404'}
<Breadcrumbs className="joyride-files-breadcrumbs" path={filefound ? files.path : '/404'}
onClick={onNavigate} onContextMenuHandle={(...args) => this.handleBreadCrumbsContextMenu(...args)}
onAddFiles={this.props.onAddFiles} onMove={this.props.onMove}/>
</div>
Expand Down