Skip to content

Commit

Permalink
Remove preview in main screen when clicking on blank space (left menu) (
Browse files Browse the repository at this point in the history
  • Loading branch information
guergana committed May 13, 2024
1 parent 85f49ee commit 1d9216f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/components/Application/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ import { useStore } from './store'
export default function Content() {
const record = useStore((state) => state.record)
const indexing = useStore((state) => state.indexing)
return indexing ? <LoadingContent /> : record ? <FileContent /> : <EmptyContent />
const path = useStore((state) => state.path)
return indexing ? (
<LoadingContent />
) : record && path ? (
<FileContent />
) : (
<EmptyContent />
)
}

function FileContent() {
Expand Down

0 comments on commit 1d9216f

Please sign in to comment.