website refactor
This commit is contained in:
@@ -21,11 +21,29 @@ export default async function LeagueSchedulePage({ params }: Props) {
|
||||
notFound();
|
||||
}
|
||||
// For serverError, show the template with empty data
|
||||
return <LeagueScheduleTemplate viewData={{
|
||||
leagueId,
|
||||
races: [],
|
||||
}} />;
|
||||
return <LeagueScheduleTemplate
|
||||
viewData={{
|
||||
leagueId,
|
||||
races: [],
|
||||
currentDriverId: undefined,
|
||||
isAdmin: false,
|
||||
}}
|
||||
onRegister={async () => {}}
|
||||
onWithdraw={async () => {}}
|
||||
onEdit={() => {}}
|
||||
onReschedule={() => {}}
|
||||
onResultsClick={() => {}}
|
||||
/>;
|
||||
}
|
||||
|
||||
return <LeagueScheduleTemplate viewData={result.unwrap()} />;
|
||||
const viewData = result.unwrap();
|
||||
|
||||
return <LeagueScheduleTemplate
|
||||
viewData={viewData}
|
||||
onRegister={async () => {}}
|
||||
onWithdraw={async () => {}}
|
||||
onEdit={() => {}}
|
||||
onReschedule={() => {}}
|
||||
onResultsClick={() => {}}
|
||||
/>;
|
||||
}
|
||||
Reference in New Issue
Block a user