website refactor
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { notFound, redirect } from 'next/navigation';
|
||||
import { DashboardPageQuery } from '@/lib/page-queries/DashboardPageQuery';
|
||||
import { DashboardTemplate } from '@/templates/DashboardTemplate';
|
||||
import { logger } from '@/lib/infrastructure/logging/logger';
|
||||
|
||||
export default async function DashboardPage() {
|
||||
const result = await DashboardPageQuery.execute();
|
||||
@@ -15,7 +16,7 @@ export default async function DashboardPage() {
|
||||
redirect('/');
|
||||
} else {
|
||||
// serverError, networkError, unknown, validationError, unauthorized
|
||||
console.error('Dashboard error:', error);
|
||||
logger.error('Dashboard error', undefined, { errorType: error });
|
||||
notFound();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user