-
Notifications
You must be signed in to change notification settings - Fork 1
Prompt Answer Display in View Profile #103
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
Conversation
…d preview profile
✅ Deploy Preview for redi-love ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Nice, ty Juju! I had originally put this weekly prompt thing at the bottom of the screen (with teh rest of the regular profile prompts), but surfacing it higher in the profile makes sense to me!
abrar-amin
left a comment
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.
Looks good; just had 2 smallish comments.
backend/src/routes/prompts.ts
Outdated
|
|
||
| if (!answer) { | ||
| // Return null/empty response instead of 404 when there's no answer | ||
| return res.status(200).json(null); |
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.
Not the biggest fan sending null responses back; could we do an empty string instead?
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.
Wait yeah good point just changed to returning empty string!
frontend/app/(auth)/view-profile.tsx
Outdated
| checkIfBlocked(); | ||
| if (promptId) { | ||
| fetchNudgeStatus(); | ||
| fetchPromptData(); |
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.
I believe Clement made it so that everything is pre-fetched whenever the app is opened; is there a way to maybe use the information from the prompt tab here instead of fetching? I don't think this will affect performance drastically though.
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.
Ahh yes I changed it to pass the active prompt as a url param so it doesnt have to re fetch - thanks for catching that Abrar!
Co-authored-by: Clément <[email protected]>
…tatus as URL params when navigating to view-profile
- Escape quotes in data-deletion page - Escape apostrophe in create-profile 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Summary
Added weekly prompt asnwers to View Profile and Preview Profile.
If there is no active prompt I have it set as "No active prompt"
If the user did not answer the prompt it says: "No comment."
I'm open to changing either of these defaults - I just picked them arbritarily.
Also let me know what you think about the positioning of the prompt answer as I also decided that completely arbritarily...
Test Plan
Screen.Recording.2025-11-30.at.5.28.42.PM.mov
Breaking Changes
Added new endpoint to get prompt answer by netid (you must be matched with them to access this)