website refactor
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { LeagueSponsorshipsPageQuery } from '@/lib/page-queries/page-queries/LeagueSponsorshipsPageQuery';
|
||||
import { LeagueSponsorshipsPageQuery } from '@/lib/page-queries/LeagueSponsorshipsPageQuery';
|
||||
import { LeagueSponsorshipsTemplate } from '@/templates/LeagueSponsorshipsTemplate';
|
||||
import { notFound } from 'next/navigation';
|
||||
|
||||
@@ -17,12 +17,14 @@ export default async function LeagueSponsorshipsPage({ params }: Props) {
|
||||
|
||||
if (result.isErr()) {
|
||||
const error = result.getError();
|
||||
if (error.type === 'notFound') {
|
||||
if (error === 'notFound') {
|
||||
notFound();
|
||||
}
|
||||
// For serverError, show the template with empty data
|
||||
return <LeagueSponsorshipsTemplate viewData={{
|
||||
leagueId,
|
||||
activeTab: 'overview',
|
||||
onTabChange: () => {},
|
||||
league: {
|
||||
id: leagueId,
|
||||
name: 'Unknown League',
|
||||
|
||||
Reference in New Issue
Block a user