Skip to content

User profile#62

Open
25tyler wants to merge 8 commits into
masterfrom
tyler-dashboard-newbie
Open

User profile#62
25tyler wants to merge 8 commits into
masterfrom
tyler-dashboard-newbie

Conversation

@25tyler
Copy link
Copy Markdown
Collaborator

@25tyler 25tyler commented Apr 1, 2026

Created User Dashboard with listings and saved posts.
Screenshot 2026-04-01 at 2 41 20 PM

@25tyler 25tyler changed the title Draft User Profile User profile Apr 1, 2026
Copy link
Copy Markdown
Collaborator

@i30101 i30101 left a comment

Choose a reason for hiding this comment

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

Overall a good start. One thing I'd generally note is to be careful about what you're pushing - both which files and what's in them. Ideally PRs should be small incremental changes, so you want to minimize unnecessary changes (especially like the whitespace edits in various files). Good job familiarizing yourself with the codebase, though.

Comment thread frontend/components/navbar/UserProfileDropdown.tsx
@@ -0,0 +1,66 @@
import Image from "next/image";
import { Star, Mail, Phone } from "lucide-react";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove unused imports, this is another thing I'd check in my files before committing

@@ -0,0 +1,48 @@
import Link from "next/link";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Consider adding bg to this component to distinguish itself from the background. It doesn't look bad right now, but just something I'd think about

Comment thread frontend/components/profile/ProfileHeader.tsx
Copy link
Copy Markdown
Collaborator

@jamesdoh0109 jamesdoh0109 left a comment

Choose a reason for hiding this comment

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

Good first pr - left some comments

Comment thread frontend/components/profile/ProfileHeader.tsx
Comment thread frontend/app/profile/page.tsx Outdated
title="Saved Posts"
count={savedPosts.count}
listings={savedPosts.results}
seeAllHref="/profile"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we not have a separate page for saved posts?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this component used anywhere?

Comment on lines +10 to +16
function maskPhoneNumber(phone: string): string {
const digits = phone.replace(/\D/g, "");
if (digits.length < 4) return phone;
const areaCode = digits.slice(digits.length - 10, digits.length - 7);
const prefix = digits.slice(digits.length - 7, digits.length - 4);
return `(${areaCode}) ${prefix}-XXXX`;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why should we mask phone numbers for user profile page?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Agreed, when viewing other peoples' profiles we might want masking but it's not needed here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Right now, the listings are horizontally scrollable - im wondering if this is necessary if we have "Show all my listings" button. What do you think?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would say the same, I think it would be simpler if clicking on "My Listings" or "Saved Posts" sent you to their respective pages instead of what we have now

Comment on lines +109 to +113
<ListingsCard
key={listing.id}
listing={listing}
previewImageUrl={listing.images[0]}
href={`/${listing.listing_type === "item" ? "items" : "sublets"}/${listing.id}`}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Image I think the card ratio looks kinda weird here? Maybe make it bigger?

return new Date(listing.expires_at) > new Date();
}

export const MyListingsContent = ({ listings }: Props) => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it's fine for now how you are showing all my listings at once, but better practice is using paginated listings. It's unlikely that a single user has that many listings that fetching all at once is gonna cause any issues, but we never know. Take a look at how this is handled in the main grid view. If you want feel free to take a stab at it here as well, but its not necessary at this pt imo

Copy link
Copy Markdown
Collaborator

@jamesdoh0109 jamesdoh0109 left a comment

Choose a reason for hiding this comment

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

Image

Looks good, i would just maybe change the color of "See all my listings" and "See all saved posts" from red to something else. It looks like a danger button. Also see if you can make the size of the listing card a bit bigger (right now it looks too small) without affecting the size in the main grid view

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