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

Fix: Footer Count Error #296

Merged
merged 12 commits into from
Aug 20, 2024
Merged

Fix: Footer Count Error #296

merged 12 commits into from
Aug 20, 2024

Conversation

Koustavd18
Copy link
Contributor

This pr fix the bug where queries are not fired on change of time range for footer count.

@Koustavd18 Koustavd18 requested a review from balaji-jr August 16, 2024 14:10
src/hooks/useQueryResult.tsx Outdated Show resolved Hide resolved
src/hooks/useQueryResult.tsx Outdated Show resolved Hide resolved
src/hooks/useQueryResult.tsx Outdated Show resolved Hide resolved
src/hooks/useQueryResult.tsx Outdated Show resolved Hide resolved
src/hooks/useQueryResult.tsx Outdated Show resolved Hide resolved
src/pages/Stream/Views/Explore/useLogsFetcher.ts Outdated Show resolved Hide resolved
@Koustavd18 Koustavd18 requested a review from balaji-jr August 19, 2024 07:32
Copy link
Contributor

@balaji-jr balaji-jr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous review comment: Making count query api call without fields is not yet resolved.

@Koustavd18 Koustavd18 requested a review from balaji-jr August 19, 2024 07:54
src/hooks/useQueryResult.tsx Outdated Show resolved Hide resolved
@Koustavd18 Koustavd18 requested a review from balaji-jr August 19, 2024 08:56
src/hooks/useQueryResult.tsx Outdated Show resolved Hide resolved
@Koustavd18 Koustavd18 requested a review from balaji-jr August 19, 2024 09:07
{
onSuccess: (data: CountResponse) => {
const count = _.first(data)?.count;
count !== undefined && setLogsStore((store) => setTotalCount(store, count));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when null ?
Appropriate check here would be setting the count only if its a number.

refetch: refetchCount,
} = useQuery(
['fetchCount', logsQuery],
async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@balaji-jr balaji-jr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the existing practice to use useQuery

@nitisht nitisht merged commit 2228e07 into parseablehq:main Aug 20, 2024
1 of 3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 20, 2024
@Koustavd18 Koustavd18 deleted the fix/footer branch August 20, 2024 17:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants