Skip to content

Conversation

thejediboySHASHANK
Copy link

What does this PR do?

Fixes issue #221

Fixes #221

The fixed issue correctly displays the number of responses submitted to a particular form.
Also, the number of forms has been underlined, referencing it as a link for easier navigation to see all the submitted response. Making the front-end experience more intuitive and easier to use.

@hemantwasthere

@github-actions github-actions bot added the bug Something isn't working label Oct 21, 2023
@github-actions
Copy link

github-actions bot commented Oct 21, 2023

Thank you for following the naming conventions! 🙏

@thejediboySHASHANK thejediboySHASHANK changed the title made number of responses count dynamic fix : made number of responses count dynamic Oct 21, 2023
@thejediboySHASHANK thejediboySHASHANK changed the title fix : made number of responses count dynamic fix: made number of responses count dynamic Oct 21, 2023
@thejediboySHASHANK
Copy link
Author

thejediboySHASHANK commented Oct 21, 2023

This fix represented visually :

fix

Also referenced the count reponses as a link, which redirects to testimonials section. Allowing easier navigation and more intuitive usability.

Loom link : https://www.loom.com/share/f733e00bf20f4c739a50053ec8e3e1ef?sid=e6daa078-c58a-48ba-861b-bcbbd4535b07

Removed the unnecessary console.log, which was used for testing.
@github-actions
Copy link

Hey there, there is a merge conflict, can you take a look?

@github-actions github-actions bot added the 🚨 merge conflict Merge Conflict label Oct 23, 2023
Copy link
Collaborator

@hemantwasthere hemantwasthere left a comment

Choose a reason for hiding this comment

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

Please resolve the conflicts!

const projectId = project?.id || ""
const { data: formResponses } = useGetFormResponsesByProjectId(projectId)

const getResponseCount = (formId: string) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please wrap this in useMemo() hook

</span>
<span className="flex items-center gap-1 truncate text-sm text-gray-500">
0 responses. Created{' '}
<Link href="/dashboard/web/testimonials" className="underline">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Handle the check for 0 responses also,
if the value of responses is 0 then show the 0 responses text else the <Link> component

@hemantwasthere
Copy link
Collaborator

Hey @thejediboySHASHANK are you working on the requested changes?

@thejediboySHASHANK
Copy link
Author

Hey @thejediboySHASHANK are you working on the requested changes?

Yes! Sorry for the delay, I will soon be making a commit to fix these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🚨 merge conflict Merge Conflict
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Dynamic update of response count missing in "Your Forms" Front-End.
2 participants