Files
goodgo-platform/apps/web/lib/chuyen-nhuong-server.ts
Ho Ngoc Hai 7ce651fce5 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>
2026-04-16 09:07:45 +07:00

16 lines
493 B
TypeScript

import type { TransferListingDetail } from './chuyen-nhuong-api';
const API_URL = process.env['NEXT_PUBLIC_API_URL'] ?? 'http://localhost:3001/api/v1';
export async function fetchTransferListingById(id: string): Promise<TransferListingDetail | null> {
try {
const res = await fetch(`${API_URL}/transfer/listings/${id}`, {
next: { revalidate: 300 },
});
if (!res.ok) return null;
return res.json() as Promise<TransferListingDetail>;
} catch {
return null;
}
}