Skip to content

Conversation

@nole2701
Copy link
Collaborator

Made an editable user profile page that's able to be reached from the user dropdown menu when signed in.
Uploads for the avatar are currently untested but implemented.

@netlify
Copy link

netlify bot commented Oct 30, 2025

Deploy Preview for dailp ready!

Name Link
🔨 Latest commit 79c69cb
🔍 Latest deploy log https://app.netlify.com/projects/dailp/deploys/691f1c97e6414e00088a68c3
😎 Deploy Preview https://deploy-preview-510--dailp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@@ -0,0 +1 @@
export default "/profile"
Copy link
Collaborator

Choose a reason for hiding this comment

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

i dont think this is necessary, vite does routing automatically if you have profile.page.tsx

Copy link
Collaborator

@alisony755 alisony755 left a comment

Choose a reason for hiding this comment

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

The editable user profile page is a useful addition! I left some comments about a few tweaks you could make, but great work overall


/** Calls the backend GraphQL mutation to update a user's profile data. */
const runUpdate = async (variables: { user: Dailp.CurrentUserUpdate }) => {
await updateUser(variables)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be a good idea to add error handling or a try/catch around this

if (!file) return

// Validate file type
const allowedTypes = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Some browsers might report file types in uppercase (like "IMAGE/PNG"), so it might be a good idea to normalize with .toLowerCase()

}

// Validate file size (5MB)
if (file.size > 5 * 1024 * 1024) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You could consider making 5MB a named constant (like MAX_FILE_SIZE_MB) in case you want to reuse or change it later

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.

4 participants