-
Notifications
You must be signed in to change notification settings - Fork 34
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
Feature/leaderboard leagues #526
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…es to leaderboard route (need to determine the actual route, /leaderboard feels wrong)
…eague being shown
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.
Pull Request Overview
This PR implements a new leaderboard leagues feature along with comprehensive league management in the admin dashboard. Key changes include the addition of league creation/editing/listing pages and forms, new actions for creating and updating leagues, and the integration of a leagues showcase into the leaderboard.
Reviewed Changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/app/(app)/admin/leagues/[uid]/page.tsx | Adds a page for editing a league using the EditLeagueForm. |
src/app/(app)/admin/leagues/create/page.tsx | Adds a page for creating new leagues via CreateLeagueForm. |
src/components/app/leaderboard/leagues/leagues-showcase.tsx | Introduces a new carousel-based leagues showcase component for the leaderboard. |
src/actions/leagues/create-league.ts | Implements a server action to create a new league. |
src/app/(app)/admin/leagues/list/page.tsx | Adds a league listing page with details and navigation links. |
src/app/(app)/admin/leagues/page.tsx | Provides a league management dashboard overview. |
src/components/app/admin/leagues/create-league-form.tsx | Implements a shared form component for league creation. |
src/actions/leagues/update-league.ts | Introduces a server action to update league data. |
src/app/(app)/admin/leagues/achievements/page.tsx | Adds a page to manage league achievements with mock data. |
src/components/app/admin/leagues/edit-league-form.tsx | Implements a league editing form used in the edit page. |
src/components/ui/icons/icons/map.tsx | Adds a new Map icon component. |
src/app/(app)/admin/page.tsx | Updates the admin dashboard to include a leagues overview section. |
src/app/(app)/admin/layout.tsx | Updates admin navigation with a new leagues dropdown menu. |
src/app/(app)/(default_layout)/leaderboard/page.tsx | Updates the leaderboard page to include the leagues showcase and premium upgrade card. |
src/components/app/leaderboard/leaderboard-most-questions-answered.tsx | Adjusts layout classes for the leaderboard rankings card. |
src/app/(app)/(default_layout)/layout.tsx | Minor layout cleanup by removing an unused separator. |
src/app/(app)/dashboard/page.tsx | Removes an unused separator for a streamlined dashboard look. |
Files not reviewed (3)
- prisma/migrations/20250309152758_init_league_schema_commit/migration.sql: Language not supported
- prisma/schema/leagues.prisma: Language not supported
- prisma/schema/users.prisma: Language not supported
Comments suppressed due to low confidence (2)
src/actions/leagues/update-league.ts:26
- The update action fetches the league using prisma.leagues while the create action uses prisma.individualLeagueData; this discrepancy may lead to inconsistent data handling. Please confirm that both actions are using the intended data models.
const league = await prisma.leagues.findUnique({
src/components/app/admin/leagues/edit-league-form.tsx:44
- [nitpick] The use of 'any' for the league prop may reduce type safety; consider defining a proper interface or type for the league object.
export default function EditLeagueForm({ league }: { league: any }) {
No description provided.