Extract all settings sections from the monolithic 1009-line route file into individual components under app/components/league/settings/. Route file drops to ~300 lines. Separates draft-order dirty state from general settings dirty state, deduplicates section-change handling, and fixes several bugs found during review (typo in pointsFor5th, wrong mock in tests, lint violations). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
615 B
TypeScript
22 lines
615 B
TypeScript
import { Link } from "react-router";
|
|
import { Button } from "~/components/ui/button";
|
|
|
|
export function LeagueSettingsHeader({
|
|
leagueId,
|
|
leagueName,
|
|
}: {
|
|
leagueId: string;
|
|
leagueName: string;
|
|
}) {
|
|
return (
|
|
<div className="mb-6 flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
|
|
<div>
|
|
<h1 className="text-3xl font-bold sm:text-4xl">League Settings</h1>
|
|
<p className="mt-1 text-muted-foreground">{leagueName}</p>
|
|
</div>
|
|
<Button variant="outline" asChild>
|
|
<Link to={`/leagues/${leagueId}`}>Back to League</Link>
|
|
</Button>
|
|
</div>
|
|
);
|
|
}
|