Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes #2800

Merged
merged 1 commit into from
Dec 20, 2023
Merged
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
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
Loading