Skip to content

Add Champions WC 26 community demo#400

Open
AyanBhardwaj1 wants to merge 2 commits into
usemoss:mainfrom
AyanBhardwaj1:add-champions-wc-26
Open

Add Champions WC 26 community demo#400
AyanBhardwaj1 wants to merge 2 commits into
usemoss:mainfrom
AyanBhardwaj1:add-champions-wc-26

Conversation

@AyanBhardwaj1

Copy link
Copy Markdown

Pull Request Checklist

Please ensure that your PR meets the following requirements:

  • I have read the CONTRIBUTING guide.
  • I have updated the documentation (if applicable).
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 56 out of 62 changed files in this pull request and generated 6 comments.

Files not reviewed (1)
  • moss-live-labs/community-demos/Champions-WC-26/app/globals.css: Generated file

Comment thread moss-live-labs/community-demos/Champions-WC-26/app/results/[id]/page.tsx Outdated
Comment on lines +7 to +13
export async function GET(_: Request, context: { params: Promise<{ id: string }> }) {
const { id } = await context.params;
const run = getRun(id);
return run
? NextResponse.json(run)
: NextResponse.json({ error: "Run not found." }, { status: 404 });
}
const [selectedTeam, setSelectedTeam] = useState("");
const [error, setError] = useState("");
const [loading, setLoading] = useState(false);
const groups = useMemo(() => Object.groupBy(field as FieldTeam[], (team) => team.group), []);
</button>
))}
</div>
{!eligiblePlayers.length && <div className="inline-error"><CircleAlert size={15} /> No player in this roster fits your remaining slots. This squad is skipped automatically.</div>}
Comment on lines +9 to +22
export const metadata: Metadata = {
metadataBase: new URL("http://localhost:3000"),
title: { default: "Champions (WC 26)", template: "%s · Champions (WC 26)" },
description: "Play Classic Wheel or World Cup Era, reveal your Squad DNA and chase a perfect 8–0 at World Cup 2026.",
applicationName: "Champions (WC 26)",
openGraph: {
title: "Champions (WC 26)",
description: "Two ways to build history. One perfect 8–0.",
type: "website",
images: [{ url: "/og-modes.png", width: 1200, height: 630, alt: "Champions WC 26 — Classic Wheel, World Cup Era and Moss Squad DNA" }],
},
twitter: { card: "summary_large_image", title: "Champions (WC 26)", description: "Two ways to build history. One perfect 8–0.", images: ["/og-modes.png"] },
icons: { icon: "/icon" },
};
Comment on lines +23 to +31
export function saveRun(result: TournamentResult) {
const id = crypto.randomUUID().slice(0, 8);
const stored = { ...result, id };
db.prepare(`
INSERT INTO runs (id, created_at, replaced_team, formation, champion, perfect, result_json)
VALUES (?, ?, ?, ?, ?, ?, ?)
`).run(id, result.createdAt, result.replacedTeam, result.formation, result.champion ? 1 : 0, result.perfect ? 1 : 0, JSON.stringify(stored));
return stored;
}
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@AyanBhardwaj1

Copy link
Copy Markdown
Author

Comitted changes from Copilot, please merge

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.

2 participants