Skip to content

Commit

Permalink
disable click on repo card if repo hasn't finished syncing (BloopAI#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiya1155 committed Mar 27, 2023
1 parent 8bf7a4a commit 5486479
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/components/RepoCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const RepoCard = ({
const { navigateRepoPath, navigateSearch } = useAppNavigation();

const handleClick = useCallback(() => {
if (isSyncing) {
if (sync_status !== SyncStatus.Done) {
return;
}
if (isGithubConnected && isAnalyticsAllowed) {
Expand All @@ -61,7 +61,7 @@ const RepoCard = ({
} else {
navigateRepoPath(`${isGh ? 'github.com/' : ''}${repoName}`);
}
}, [repoName, provider, isGithubConnected, isAnalyticsAllowed, isSyncing]);
}, [repoName, provider, isGithubConnected, isAnalyticsAllowed, sync_status]);

return (
<div className="bg-gray-900 border border-gray-800 rounded-md p-4 w-full flex flex-col justify-between h-36">
Expand Down

0 comments on commit 5486479

Please sign in to comment.