Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/app/stats/region/[regionId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,12 @@ export default async function RegionDetailPage({
<PageHeader
image={regionData.info?.logo_url ?? undefined}
name={`F3 ${regionData.info?.region_name}`}
link={undefined}
linkName={regionData.info?.sector_name ?? undefined}
link={
regionData.info?.area_id
? `/stats/area/${regionData.info.area_id}`
: undefined
}
linkName={regionData.info?.area_name ?? undefined}
/>
<RegionalPageWrapper
region_id={Number(regionId)}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bq/regions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ export async function getPageData(
-- Region info as a STRUCT
(
SELECT AS STRUCT
region_id, region_name, sector_name, logo_url, is_active, aos, types, tags
region_id, region_name, area_id, area_name, logo_url, is_active, aos, types, tags
FROM pv_regions
WHERE region_id = ${regionId}
LIMIT 1
Expand Down
3 changes: 2 additions & 1 deletion src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ export interface RegionData {
export interface RegionInfo {
region_id: number; // Unique identifier for the region
region_name: string; // Name of the region
sector_name: string; // Name of the sector
area_id: number; // Unique identifier for the area, can be null
area_name: string; // Name of the area
logo_url: string | null; // URL to the region's logo, can be null
is_active: boolean; // Indicates if the region is active
aos: { ao_org_id: number; ao_name: string }[];
Expand Down
Loading