Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
- Remove entries count
- Change empty message in auto entries modal
  • Loading branch information
subinasr authored and AdityaKhatri committed Dec 20, 2023
1 parent 46ed6e7 commit 76bcd35
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions app/views/EntryEdit/LeftPane/AutoEntriesModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ const AUTO_ENTRIES_FOR_LEAD = gql`
) {
project(id: $projectId) {
id
lead(id: $leadId) {
draftEntryStat {
discardedDraftEnrty
undiscardedDraftEntry
}
}
assistedTagging {
draftEntryByLeads(
filter: {
Expand Down Expand Up @@ -573,8 +567,6 @@ function AutoEntriesModal(props: Props) {
]);

const {
previousData,
data: autoEntries = previousData,
loading: autoEntriesLoading,
refetch: retriggerAutoEntriesFetch,
} = useQuery<AutoEntriesForLeadQuery, AutoEntriesForLeadQueryVariables>(
Expand Down Expand Up @@ -676,11 +668,6 @@ function AutoEntriesModal(props: Props) {
},
);

const discardedEntriesCount = autoEntries?.project?.lead
?.draftEntryStat?.discardedDraftEnrty ?? 0;
const undiscardedEntriesCount = autoEntries?.project?.lead
?.draftEntryStat?.undiscardedDraftEntry ?? 0;

const handleEntryCreateButtonClick = useCallback((entryId: string) => {
if (!allRecommendations?.[entryId]) {
return;
Expand Down Expand Up @@ -946,12 +933,12 @@ function AutoEntriesModal(props: Props) {
<Tab
name="extracted"
>
{`All Recommendations (${undiscardedEntriesCount})`}
All Recommendations
</Tab>
<Tab
name="discarded"
>
{`Discarded Recommendations (${discardedEntriesCount})`}
Discarded Recommendations
</Tab>
</TabList>
)}
Expand Down

0 comments on commit 76bcd35

Please sign in to comment.