feat(web): add khu-cong-nghiep, chuyen-nhuong, and reports pages
Add three new frontend page sections: - Industrial parks (khu-cong-nghiep): listing, detail, filter bar - Transfer listings (chuyen-nhuong): search, category tabs, detail - AI reports dashboard: list, create, viewer with TOC Includes components, API clients, hooks, server helpers, i18n keys, navigation links in public and dashboard layouts, and lint fixes. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
15
apps/web/lib/khu-cong-nghiep-server.ts
Normal file
15
apps/web/lib/khu-cong-nghiep-server.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { IndustrialParkDetail } from './khu-cong-nghiep-api';
|
||||
|
||||
const API_URL = process.env['NEXT_PUBLIC_API_URL'] ?? 'http://localhost:3001/api/v1';
|
||||
|
||||
export async function fetchIndustrialParkBySlug(slug: string): Promise<IndustrialParkDetail | null> {
|
||||
try {
|
||||
const res = await fetch(`${API_URL}/industrial/parks/${slug}`, {
|
||||
next: { revalidate: 300 },
|
||||
});
|
||||
if (!res.ok) return null;
|
||||
return res.json() as Promise<IndustrialParkDetail>;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user