website refactor
This commit is contained in:
@@ -4,6 +4,7 @@ import { Trophy } from 'lucide-react';
|
||||
import { redirect } from 'next/navigation';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import { TeamLeaderboardPageWrapper } from './TeamLeaderboardPageWrapper';
|
||||
import { TeamSummaryViewModel } from '@/lib/view-models/TeamSummaryViewModel';
|
||||
|
||||
// ============================================================================
|
||||
// MAIN PAGE COMPONENT
|
||||
@@ -21,7 +22,7 @@ export default async function TeamLeaderboardPage() {
|
||||
let error = null;
|
||||
|
||||
if (result.isOk()) {
|
||||
data = result.unwrap();
|
||||
data = result.unwrap().map(t => new TeamSummaryViewModel(t));
|
||||
} else {
|
||||
const domainError = result.getError();
|
||||
error = new Error(domainError.message);
|
||||
@@ -52,4 +53,4 @@ export default async function TeamLeaderboardPage() {
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user