Skip to content

Add custom links and owner check to profile page #137#181

Open
mspandey wants to merge 1 commit into
PRODHOSH:mainfrom
mspandey:patch-2
Open

Add custom links and owner check to profile page #137#181
mspandey wants to merge 1 commit into
PRODHOSH:mainfrom
mspandey:patch-2

Conversation

@mspandey

Copy link
Copy Markdown

Resolves #137

This PR updates the server-side data fetching for the dynamic profile page to support custom user links and edit permissions.

Changes included:

  • Updated the Supabase query in page.tsx to fetch the new custom_links column from the profiles table.
  • Implemented an authentication check using supabase.auth.getSession() to determine if the current viewer is the profile owner (isOwner).
  • Passed both customLinks and isOwner down as props to the <ProfileView> component to prepare for the frontend UI implementation.

Summary

Related Issue

Closes #

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • Chore / dependency update

Changes Made

AI Usage

  • I did not use AI for any part of the code in this PR
  • I used AI for coding (specify which tool below) and I fully understand every change I made, including which functions I changed, why I changed them, and what side effects they could create

Screenshots (if UI change)

Checklist

  • I was assigned to the issue before opening this PR
  • My branch is up to date with main
  • Code works locally and I have tested it
  • No console.log left in src/
  • If schema changed — both schema.sql and a new migration file are included
  • If this is a UI change — I read DESIGN.md and followed the design system (colors, spacing, typography, components)
  • Docs updated if needed
  • PR title follows Conventional Commits format (feat:, fix:, docs:, etc.)
  • This PR description is written in my own words

Resolves PRODHOSH#137

This PR updates the server-side data fetching for the dynamic profile page to support custom user links and edit permissions.

Changes included:
- Updated the Supabase query in `page.tsx` to fetch the new `custom_links` column from the `profiles` table.
- Implemented an authentication check using `supabase.auth.getSession()` to determine if the current viewer is the profile owner (`isOwner`).
- Passed both `customLinks` and `isOwner` down as props to the `<ProfileView>` component to prepare for the frontend UI implementation.
@github-actions github-actions Bot added the frontend Related to UI / Next.js label Jun 23, 2026
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cc974e05-bce1-476c-b0c7-bb7f89e25168

📥 Commits

Reviewing files that changed from the base of the PR and between c802435 and 40ef055.

📒 Files selected for processing (1)
  • src/app/[username]/page.tsx
 _____________________________
< ░R░e░v░i░e░w░ ░i░n░ ░b░i░o░ >
 -----------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

@PRODHOSH PRODHOSH self-requested a review June 23, 2026 13:00
@PRODHOSH

PRODHOSH commented Jun 23, 2026

Copy link
Copy Markdown
Owner

@mspandey pls update ur pr description properly as per template
and pls fix the build error

image

@PRODHOSH PRODHOSH added ELUSOC ELUSOC project submission in-progress ADVENTURER Intermediate — 25 pts labels Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ADVENTURER Intermediate — 25 pts ELUSOC ELUSOC project submission frontend Related to UI / Next.js in-progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Let logged-in users add and edit their social links on their own profile

2 participants