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: Pages Malfunctioning on Load and Recent Pages Computation #3359

Merged
merged 3 commits into from
Jan 12, 2024

Conversation

henit-chobisa
Copy link
Collaborator

  • Updated Recent Pages Computation based on updated_at instead of created_at.
  • Updated usePage hook, to return IPageStore instead of the whole context.

@henit-chobisa henit-chobisa changed the base branch from preview to develop January 12, 2024 06:57
@henit-chobisa henit-chobisa self-assigned this Jan 12, 2024
return response;
});
} catch (error) {
return [];
Copy link
Contributor

Choose a reason for hiding this comment

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

catch block should always throw the error message, to handle it at the component level. By returning an empty array we can never identify if the server value is empty or it is an error case.

@sriramveeraghanta sriramveeraghanta merged commit f58a00a into develop Jan 12, 2024
6 of 8 checks passed
@sriramveeraghanta sriramveeraghanta deleted the fix/pages-malfunction branch January 12, 2024 07:56
@sriramveeraghanta sriramveeraghanta changed the title [FIX] Pages Malfunctioning on Load and Recent Pages Computation fix: Pages Malfunctioning on Load and Recent Pages Computation Jan 12, 2024
sriramveeraghanta pushed a commit that referenced this pull request Jan 22, 2024
* fix: fixed `usePage` hook returning context instead of IPageStore

* fix: updated recent pages with `updated_at` instead of `created_at`

* fix: thown error instead of returning empty array
sriramveeraghanta pushed a commit that referenced this pull request Jan 22, 2024
* fix: fixed `usePage` hook returning context instead of IPageStore

* fix: updated recent pages with `updated_at` instead of `created_at`

* fix: thown error instead of returning empty array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants