- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4
 
Adding member details entry page #43
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
base: main
Are you sure you want to change the base?
Conversation
| 
           The latest updates on your projects. Learn more about Vercel for GitHub. 
  | 
    
          ✅ Deploy Preview for zingy-speculoos-372a93 ready!
 To edit notification comments on pull requests, go to your Netlify project configuration.  | 
    
| }); | ||
| }; | ||
| 
               | 
          ||
| useEffect(()=>{ | 
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.
Why do u want to fetch the member details again? Can't you use the safe data that was fetched for the view? It reduces a query to the backend, plus useEffect like this are not really standard in NextJS, its a good practice to fetch the data inside a server component (refer this)
| setProfileData(member); | ||
| setIsLoading(false); | ||
| } | ||
| else console.log("Error Fetching User Data!"); | 
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.
Use toast.error instead of console unless for debugging purposes
| setProfileData(member); | ||
| setIsLoading(false); | ||
| } | ||
| else console.log("Error Fetching User Data!"); | 
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.
The page will just keep on loading if there is no member data. handle this as enrolment for now, just let them enter their details
| htmlFor="profileImage" | ||
| className={`absolute bottom-0 right-0 bg-primaryYellow p-2 rounded-full cursor-pointer`} | ||
| > | ||
| <svg xmlns="http://www.w3.org/2000/svg" className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | 
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'm supposing this is a placeholder image, u can actually use an icon from Lucid React for this
Closes:
#40
Description:
This version of the PR currently adds the UI without any functionality that will be added.
Changes Made:
Updated Edit Profile with new UI screen and added basic logic that changes field for user first enrolling & for user updating his details.
Screenshots:

Additional Details:
nil