-
Notifications
You must be signed in to change notification settings - Fork 429
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
modify loader flag for patients count #8034
modify loader flag for patients count #8034
Conversation
@FrankenDeba is attempting to deploy a commit to the Open Healthcare Network Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -902,7 +902,7 @@ export const PatientManager = () => { | |||
<CountBlock | |||
text="Total Patients" | |||
count={data?.count || 0} | |||
loading={isLoading} | |||
loading={(!data?.count && data?.count !== 0) || isLoading} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FrankenDeba make this change at CountBlock so that it is applied throughout the application
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@khavinshankar Done, please check it!
@@ -22,7 +22,7 @@ export default function CountBlock(props: Props) { | |||
<dt className="my-2 truncate text-sm font-semibold text-gray-700"> | |||
{props.text} | |||
</dt> | |||
{props.loading ? ( | |||
{props.loading || (!props.count && props.count !== 0) ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't this be stuck in the loading state if the count is actually 0?
we should not collace count to 0 if it's undefined while passing it to the component, and hide loading state when the count becomes defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't understand,I am already checking if the count is not 0,do I still need to change the approach?
@sainak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You there?
Can you please be more specific about the changes?
@sainak
Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions. |
Hi, @coronasafe/care-frontend-maintainers, This PR has been automatically closed due to inactivity. Thank you for your contributions. Feel free to re-open the PR. |
Proposed Changes
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist