Skip to content

Commit

Permalink
fix checking if repos are searchable (was preventing search on app re…
Browse files Browse the repository at this point in the history
…start) (BloopAI#380)
  • Loading branch information
anastasiya1155 committed Apr 13, 2023
1 parent c09cfe2 commit 29daf76
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/src/components/SearchInput/SearchTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,13 @@ const SearchTextInput = forwardRef(function TextInputWithRef(
const [showModal, setShowModal] = useState(false);

const isDisabled = useMemo(
() => !repositories?.find((r) => r.sync_status === SyncStatus.Done),
() =>
!repositories?.find(
(r) =>
r.last_index &&
r.last_index !== '1970-01-01T00:00:00Z' &&
r.sync_status !== SyncStatus.Removed,
),
[repositories],
);

Expand Down

0 comments on commit 29daf76

Please sign in to comment.