Skip to content

[BUG] compare/[users] page: unused users variable destructured from params #2132

@nishupr

Description

@nishupr

File: src/app/compare/[users]/page.tsx (~line 82)

Bug:

export default async function PublicProfileComparePage({
  params,
}: { params: Promise<{ users: string }> }) {
  const { users } = await params; // ← destructured but never used
  const parsed = await parseUsers(params); // uses params again (calls await params internally)

params is awaited twice — once to extract users (which is then never referenced), and then parseUsers(params) also awaits params internally. In Next.js 15 params is a Promise, and while it can be awaited multiple times safely, the redundant const { users } = await params is dead code that was likely left over from a refactor. More critically, parseUsers already re-awaits the same Promise, which works now but creates confusion and could mask future bugs if the implementation changes.

Fix: Remove the dead const { users } = await params line.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggssoc:assignedGSSoC: Issue assigned to a contributor

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions