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

bug fix #1383

Merged
merged 3 commits into from
Dec 13, 2023
Merged

bug fix #1383

merged 3 commits into from
Dec 13, 2023

Conversation

azheng1991
Copy link
Collaborator

Summary

Add a short summary of the changes, and a reference to the original issue using # and the issue number, like #1
I added a countTestimonies function that gets the total count of testimonies per user and integrated that into the view testimony component so that you are able to get a count of the how many testimonies each user has published when on the profile page of the user.

Screenshots

image

Known issues

As I discussed with Matt, we should ensure that the total testimonies count is accurately updated when you delete a testimony as well.

Steps to test/reproduce

  1. Sign in
  2. Click on view profile.
  3. Scroll down to view testimony pagination

Copy link

vercel bot commented Dec 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
maple-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2023 2:06am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
maple-prod ⬜️ Ignored (Inspect) Visit Preview Dec 7, 2023 2:06am

@mertbagt
Copy link
Collaborator

mertbagt commented Dec 6, 2023

image

also, same file: ./components/TestimonyCard/ViewTestimony.tsx,

ln 181 t: TFunction
(Cannot find name 'TFunction'. Did you mean 'Function'?)

other than that, looks pretty good, thanks!

@azheng1991
Copy link
Collaborator Author

@mertbagt did the above errors occur during the vercel deployment?

@mertbagt
Copy link
Collaborator

mertbagt commented Dec 6, 2023

@mertbagt did the above errors occur during the vercel deployment?

yea, if you click on details, you can pull up the deployment overview to see all the logs.

image

although, I see the same warnings on my local review copy of this branch in my ide

I got some minor errors displaying the relevant page when I tried to run the app, but I think those will go away when the above issue is resolved.

@azheng1991
Copy link
Collaborator Author

okay, squashed I believe!

@mertbagt
Copy link
Collaborator

mertbagt commented Dec 7, 2023

awesome, that cleaned up the compiling errors.

however, I'm not getting the testimony counter (i.e. there are X - Y out of Z) but instead "There are no testimonies" when there are in fact testimonies for the account in question.

image

I get this with both the deployment and running the code locally. Whenever I navigate to "View Profile", I get this on my local console:

image

I'm wondering if it could be an issue with one of my testing accounts vs, an issue with firebase.

If you hit View Deployment on this PR, are you able to get the testimony counter to display properly on your end? I'm going to reach out to one of the devs more familiar with firebase to see what they think,

@azheng1991
Copy link
Collaborator Author

Ah yes, I saw that error before and believe it has to do with firebase credentials. I had to generate a new secret key in firebase and then save it within .env.local in order to get past the error. I think this section in countTestimonies:

`if (!getApps().length) {
  initializeApp({
    credential: cert({
      projectId: process.env.FIREBASE_PROJECT_ID,
      clientEmail: process.env.FIREBASE_CLIENT_EMAIL,
      privateKey: process.env.FIREBASE_PRIVATE_KEY?.replace(/\\n/g, '\n'),
    }),`

needs to be set to the correct firebase credentials for the production server and then it should work

@azheng1991
Copy link
Collaborator Author

@mertbagt were you able to connect with any of the other firebase maple devs?

@mertbagt
Copy link
Collaborator

mertbagt commented Dec 8, 2023

Yea, I was going over it with @sashamaryl yesterday and she's looking into it.

@azheng1991
Copy link
Collaborator Author

great!

@sashamaryl sashamaryl merged commit f0dfec0 into codeforboston:main Dec 13, 2023
6 of 7 checks passed
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.

3 participants