From d5af5e5cb79a2eb16b61e0f95ab2e14aa470917e Mon Sep 17 00:00:00 2001 From: Samuel Therrien Date: Thu, 24 Oct 2024 11:44:06 -0400 Subject: [PATCH 1/3] Remove redundant "type" folder in models Bump eslint-plugin-unicorn to 55 in .pre-commit-config.yaml --- .pre-commit-config.yaml | 2 +- .../src/components/analytics/site-modal/SiteCoordinates.tsx | 2 +- .../src/components/analytics/site-modal/SiteModal.tsx | 2 +- canopeum_frontend/src/components/social/AnnouncementCard.tsx | 2 +- canopeum_frontend/src/components/social/ContactCard.tsx | 2 +- canopeum_frontend/src/components/social/PostCard.tsx | 2 +- canopeum_frontend/src/components/social/SiteSocialHeader.tsx | 2 +- canopeum_frontend/src/models/{types => }/Coordinate.ts | 0 .../models/{types/PageViewMode.Type.ts => PageViewMode.type.ts} | 0 canopeum_frontend/src/pages/Analytics.tsx | 2 +- canopeum_frontend/src/pages/SiteSocialPage.tsx | 2 +- 11 files changed, 9 insertions(+), 9 deletions(-) rename canopeum_frontend/src/models/{types => }/Coordinate.ts (100%) rename canopeum_frontend/src/models/{types/PageViewMode.Type.ts => PageViewMode.type.ts} (100%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 232ec93eb..9ad4a59ab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -65,7 +65,7 @@ repos: "eslint-plugin-regexp@2.0", "eslint-plugin-simple-import-sort@12.0", "eslint-plugin-sonarjs@1.0", - "eslint-plugin-unicorn@49.0", + "eslint-plugin-unicorn@55.0", "eslint-plugin-unused-imports@3.2", # Transitive dependencies of ESLint-Config-Beslogic "@typescript-eslint/eslint-plugin@7.18", # dependency of typescript-eslint diff --git a/canopeum_frontend/src/components/analytics/site-modal/SiteCoordinates.tsx b/canopeum_frontend/src/components/analytics/site-modal/SiteCoordinates.tsx index 1f0819c36..bdd164514 100644 --- a/canopeum_frontend/src/components/analytics/site-modal/SiteCoordinates.tsx +++ b/canopeum_frontend/src/components/analytics/site-modal/SiteCoordinates.tsx @@ -1,6 +1,6 @@ import { useTranslation } from 'react-i18next' -import { type Coordinate, defaultLatitude, defaultLongitude } from '@models/types/Coordinate' +import { type Coordinate, defaultLatitude, defaultLongitude } from '@models/Coordinate' type Props = { readonly latitude?: Coordinate, diff --git a/canopeum_frontend/src/components/analytics/site-modal/SiteModal.tsx b/canopeum_frontend/src/components/analytics/site-modal/SiteModal.tsx index e0a874cc5..dde853535 100644 --- a/canopeum_frontend/src/components/analytics/site-modal/SiteModal.tsx +++ b/canopeum_frontend/src/components/analytics/site-modal/SiteModal.tsx @@ -7,7 +7,7 @@ import SiteCoordinates from '@components/analytics/site-modal/SiteCoordinates' import TreeSpeciesSelector from '@components/analytics/TreeSpeciesSelector' import { LanguageContext } from '@components/context/LanguageContext' import useApiClient from '@hooks/ApiClientHook' -import { type Coordinate, defaultLatitude, defaultLongitude, extractCoordinate } from '@models/types/Coordinate' +import { type Coordinate, defaultLatitude, defaultLongitude, extractCoordinate } from '@models/Coordinate' import { type SiteType, Species } from '@services/api' import { getApiBaseUrl } from '@services/apiSettings' diff --git a/canopeum_frontend/src/components/social/AnnouncementCard.tsx b/canopeum_frontend/src/components/social/AnnouncementCard.tsx index 5f53387e4..b15a9f2ed 100644 --- a/canopeum_frontend/src/components/social/AnnouncementCard.tsx +++ b/canopeum_frontend/src/components/social/AnnouncementCard.tsx @@ -2,7 +2,7 @@ import { useState } from 'react' import { Link } from 'react-router-dom' import SiteAnnouncementModal from '@components/social/site-modal/SiteAnnouncementModal' -import type { PageViewMode } from '@models/types/PageViewMode.Type' +import type { PageViewMode } from '@models/PageViewMode.type' import type { Announcement } from '@services/api' type Props = { diff --git a/canopeum_frontend/src/components/social/ContactCard.tsx b/canopeum_frontend/src/components/social/ContactCard.tsx index 753e1ec5e..1c214dc6a 100644 --- a/canopeum_frontend/src/components/social/ContactCard.tsx +++ b/canopeum_frontend/src/components/social/ContactCard.tsx @@ -6,7 +6,7 @@ import instagramLogo from '@assets/icons/instagram-contact-logo.svg' import linkedinLogo from '@assets/icons/linkedin-contact-logo.svg' import xLogo from '@assets/icons/x-contact-logo.svg' import SiteContactModal from '@components/social/site-modal/SiteContactModal' -import type { PageViewMode } from '@models/types/PageViewMode.Type' +import type { PageViewMode } from '@models/PageViewMode.type' import type { Contact } from '@services/api' type Props = { diff --git a/canopeum_frontend/src/components/social/PostCard.tsx b/canopeum_frontend/src/components/social/PostCard.tsx index 015d91afe..7aa1336fb 100644 --- a/canopeum_frontend/src/components/social/PostCard.tsx +++ b/canopeum_frontend/src/components/social/PostCard.tsx @@ -13,7 +13,7 @@ import TextExpansion from '@components/inputs/TextExpansion' import PostCommentsDialog from '@components/social/PostCommentsDialog' import SharePostDialog from '@components/social/SharePostDialog' import useApiClient from '@hooks/ApiClientHook' -import type { PageViewMode } from '@models/types/PageViewMode.Type' +import type { PageViewMode } from '@models/PageViewMode.type' import type { Post } from '@services/api' import usePostsStore from '@store/postsStore' diff --git a/canopeum_frontend/src/components/social/SiteSocialHeader.tsx b/canopeum_frontend/src/components/social/SiteSocialHeader.tsx index f77d7cc40..81cf4cd35 100644 --- a/canopeum_frontend/src/components/social/SiteSocialHeader.tsx +++ b/canopeum_frontend/src/components/social/SiteSocialHeader.tsx @@ -9,7 +9,7 @@ import { LanguageContext } from '@components/context/LanguageContext' import ToggleSwitch from '@components/inputs/ToggleSwitch' import PrimaryIconBadge from '@components/PrimaryIconBadge' import useApiClient from '@hooks/ApiClientHook' -import type { PageViewMode } from '@models/types/PageViewMode.Type' +import type { PageViewMode } from '@models/PageViewMode.type' import { PatchedUpdateSitePublicStatus, type SiteSocial, User } from '@services/api' import { getApiBaseUrl } from '@services/apiSettings' diff --git a/canopeum_frontend/src/models/types/Coordinate.ts b/canopeum_frontend/src/models/Coordinate.ts similarity index 100% rename from canopeum_frontend/src/models/types/Coordinate.ts rename to canopeum_frontend/src/models/Coordinate.ts diff --git a/canopeum_frontend/src/models/types/PageViewMode.Type.ts b/canopeum_frontend/src/models/PageViewMode.type.ts similarity index 100% rename from canopeum_frontend/src/models/types/PageViewMode.Type.ts rename to canopeum_frontend/src/models/PageViewMode.type.ts diff --git a/canopeum_frontend/src/pages/Analytics.tsx b/canopeum_frontend/src/pages/Analytics.tsx index 4622816e7..3933a1e89 100644 --- a/canopeum_frontend/src/pages/Analytics.tsx +++ b/canopeum_frontend/src/pages/Analytics.tsx @@ -10,7 +10,7 @@ import { AuthenticationContext } from '@components/context/AuthenticationContext import { LanguageContext } from '@components/context/LanguageContext' import { SnackbarContext } from '@components/context/SnackbarContext' import useApiClient from '@hooks/ApiClientHook' -import { coordinateToString } from '@models/types/Coordinate' +import { coordinateToString } from '@models/Coordinate' import type { SiteSummary, User } from '@services/api' import { assetFormatter } from '@utils/assetFormatter' diff --git a/canopeum_frontend/src/pages/SiteSocialPage.tsx b/canopeum_frontend/src/pages/SiteSocialPage.tsx index e0478162b..e52171366 100644 --- a/canopeum_frontend/src/pages/SiteSocialPage.tsx +++ b/canopeum_frontend/src/pages/SiteSocialPage.tsx @@ -15,7 +15,7 @@ import WidgetCard from '@components/social/WidgetCard' import WidgetDialog from '@components/social/WidgetDialog' import useApiClient from '@hooks/ApiClientHook' import usePostsInfiniteScrolling from '@hooks/PostsInfiniteScrollingHook' -import type { PageViewMode } from '@models/types/PageViewMode.Type' +import type { PageViewMode } from '@models/PageViewMode.type' import { type IWidget, PatchedWidget, type Post, type SiteSocial, Widget } from '@services/api' import { ensureError } from '@services/errors' import usePostsStore from '@store/postsStore' From cda0e118790938c937b0ec426d78dcbfdb0c7ca4 Mon Sep 17 00:00:00 2001 From: Samuel Therrien Date: Thu, 24 Oct 2024 12:51:31 -0400 Subject: [PATCH 2/3] Make PrimaryIconBadge color-agnostic --- .../src/components/IconBadge.tsx | 30 +++++++++++++++++++ .../src/components/PrimaryIconBadge.tsx | 21 ------------- .../components/analytics/SiteSummaryCard.tsx | 4 +-- .../components/social/SiteSocialHeader.tsx | 4 +-- canopeum_frontend/src/pages/Utilities.tsx | 10 +++---- 5 files changed, 39 insertions(+), 30 deletions(-) create mode 100644 canopeum_frontend/src/components/IconBadge.tsx delete mode 100644 canopeum_frontend/src/components/PrimaryIconBadge.tsx diff --git a/canopeum_frontend/src/components/IconBadge.tsx b/canopeum_frontend/src/components/IconBadge.tsx new file mode 100644 index 000000000..b202ddee8 --- /dev/null +++ b/canopeum_frontend/src/components/IconBadge.tsx @@ -0,0 +1,30 @@ +import type { MaterialIcon } from 'material-icons' + +import type { SiteTypeIconKey } from '@models/SiteType' + +type Props = { + readonly iconKey: MaterialIcon | SiteTypeIconKey, + readonly bgColor?: string, +} + +const IconBadge = (props: Props) => { + const bgColor = props.bgColor === '' + ? '' + : `text-bg-${props.bgColor ?? 'primary'}` + + return ( +
+ + {props.iconKey} + +
+ ) +} + +export default IconBadge diff --git a/canopeum_frontend/src/components/PrimaryIconBadge.tsx b/canopeum_frontend/src/components/PrimaryIconBadge.tsx deleted file mode 100644 index 3daaf931b..000000000 --- a/canopeum_frontend/src/components/PrimaryIconBadge.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import type { MaterialIcon } from 'material-icons' - -type Props = { - readonly type: MaterialIcon, -} - -const PrimaryIconBadge = (props: Props) => ( -
- - {props.type} - -
-) - -export default PrimaryIconBadge diff --git a/canopeum_frontend/src/components/analytics/SiteSummaryCard.tsx b/canopeum_frontend/src/components/analytics/SiteSummaryCard.tsx index c97c0dbb7..7fd436398 100644 --- a/canopeum_frontend/src/components/analytics/SiteSummaryCard.tsx +++ b/canopeum_frontend/src/components/analytics/SiteSummaryCard.tsx @@ -5,8 +5,8 @@ import { Link } from 'react-router-dom' import SiteSponsorProgress from '@components/analytics/SiteSponsorProgress' import SiteSummaryActions from '@components/analytics/SiteSummaryActions' import { AuthenticationContext } from '@components/context/AuthenticationContext' +import IconBadge from '@components/IconBadge' import CustomIcon from '@components/icons/CustomIcon' -import PrimaryIconBadge from '@components/PrimaryIconBadge' import { appRoutes } from '@constants/routes.constant' import type { SiteSummary, User } from '@services/api' @@ -35,7 +35,7 @@ const SiteSummaryCard = ({ site, admins, onSiteChange, onSiteEdit }: Props) => {
- +
{site.name}
diff --git a/canopeum_frontend/src/components/social/SiteSocialHeader.tsx b/canopeum_frontend/src/components/social/SiteSocialHeader.tsx index 81cf4cd35..d9c995696 100644 --- a/canopeum_frontend/src/components/social/SiteSocialHeader.tsx +++ b/canopeum_frontend/src/components/social/SiteSocialHeader.tsx @@ -6,8 +6,8 @@ import { useTranslation } from 'react-i18next' import BatchSponsorLogo from '@components/batches/BatchSponsorLogo' import { AuthenticationContext } from '@components/context/AuthenticationContext' import { LanguageContext } from '@components/context/LanguageContext' +import IconBadge from '@components/IconBadge' import ToggleSwitch from '@components/inputs/ToggleSwitch' -import PrimaryIconBadge from '@components/PrimaryIconBadge' import useApiClient from '@hooks/ApiClientHook' import type { PageViewMode } from '@models/PageViewMode.type' import { PatchedUpdateSitePublicStatus, type SiteSocial, User } from '@services/api' @@ -120,7 +120,7 @@ const SiteSocialHeader = ({ site, viewMode }: Props) => {
- +

{translateValue(site.siteType)}

diff --git a/canopeum_frontend/src/pages/Utilities.tsx b/canopeum_frontend/src/pages/Utilities.tsx index a65fad2f5..002396ae1 100644 --- a/canopeum_frontend/src/pages/Utilities.tsx +++ b/canopeum_frontend/src/pages/Utilities.tsx @@ -3,7 +3,7 @@ import facebookLogo from '@assets/icons/facebook-regular.svg' import canopeumLogo from '@assets/images/Canopeum_Logo.jpg' -import PrimaryIconBadge from '@components/PrimaryIconBadge' +import IconBadge from '@components/IconBadge' const Utilities = () => (
@@ -60,10 +60,10 @@ const Utilities = () => (

Badges

- - - - + + + +
From c84a0fbe70d6f9856fe8670d20be8bdaf81e0e9f Mon Sep 17 00:00:00 2001 From: Samuel Therrien Date: Thu, 24 Oct 2024 13:19:56 -0400 Subject: [PATCH 3/3] Render icon per site type --- .../commands/initialize_database.py | 2 +- .../components/analytics/SiteSummaryCard.tsx | 3 +- .../src/components/assets/SiteTypePin.tsx | 21 +++++++++++ .../src/components/settings/AdminCard.tsx | 8 +++- .../components/social/SiteSocialHeader.tsx | 3 +- canopeum_frontend/src/models/SiteType.ts | 24 ++++++++++++ canopeum_frontend/src/pages/Map.tsx | 23 +++--------- canopeum_frontend/src/pages/Utilities.tsx | 37 ++++++++++--------- 8 files changed, 83 insertions(+), 38 deletions(-) create mode 100644 canopeum_frontend/src/components/assets/SiteTypePin.tsx create mode 100644 canopeum_frontend/src/models/SiteType.ts diff --git a/canopeum_backend/canopeum_backend/management/commands/initialize_database.py b/canopeum_backend/canopeum_backend/management/commands/initialize_database.py index 1ec33857f..12427fba7 100644 --- a/canopeum_backend/canopeum_backend/management/commands/initialize_database.py +++ b/canopeum_backend/canopeum_backend/management/commands/initialize_database.py @@ -423,7 +423,7 @@ def create_tree_types(self): ) def create_site_types(self): - # This mapping MUST MATCH pinMap in canopeum_frontend/src/pages/Map.tsx + # This mapping MUST MATCH pinMap in canopeum_frontend/src/models/SiteType.ts site_type_names = { 1: ("Canopeum", "Canopeum"), 2: ("Parks", "Parcs"), diff --git a/canopeum_frontend/src/components/analytics/SiteSummaryCard.tsx b/canopeum_frontend/src/components/analytics/SiteSummaryCard.tsx index 7fd436398..5a7e8dce3 100644 --- a/canopeum_frontend/src/components/analytics/SiteSummaryCard.tsx +++ b/canopeum_frontend/src/components/analytics/SiteSummaryCard.tsx @@ -8,6 +8,7 @@ import { AuthenticationContext } from '@components/context/AuthenticationContext import IconBadge from '@components/IconBadge' import CustomIcon from '@components/icons/CustomIcon' import { appRoutes } from '@constants/routes.constant' +import { getSiteTypeIconKey } from '@models/SiteType' import type { SiteSummary, User } from '@services/api' type Props = { @@ -35,7 +36,7 @@ const SiteSummaryCard = ({ site, admins, onSiteChange, onSiteEdit }: Props) => {
- +
{site.name}
diff --git a/canopeum_frontend/src/components/assets/SiteTypePin.tsx b/canopeum_frontend/src/components/assets/SiteTypePin.tsx new file mode 100644 index 000000000..2e9d0930a --- /dev/null +++ b/canopeum_frontend/src/components/assets/SiteTypePin.tsx @@ -0,0 +1,21 @@ +import CanopeumPin from '@assets/icons/pins/canopeum-pin.svg' +import CorporateLotPin from '@assets/icons/pins/corporate-lot-pin.svg' +import EducationalFacilityPin from '@assets/icons/pins/educational-facility-pin.svg' +import FarmsLandPin from '@assets/icons/pins/farms-land-pin.svg' +import IndegeniousCommunityPin from '@assets/icons/pins/indegenious-community-pin.svg' +import ParkPin from '@assets/icons/pins/park-pin.svg' +import type { SiteTypeID } from '@models/SiteType' + +const pinMap: Record = { + 1: CanopeumPin, + 2: ParkPin, + 3: IndegeniousCommunityPin, + 4: EducationalFacilityPin, + 5: FarmsLandPin, + 6: CorporateLotPin, +} + +type Props = { siteTypeId: keyof typeof pinMap } + +const SiteTypePin = ({ siteTypeId }: Props) => pinMap[siteTypeId] +export default SiteTypePin diff --git a/canopeum_frontend/src/components/settings/AdminCard.tsx b/canopeum_frontend/src/components/settings/AdminCard.tsx index 443079c3d..2a12d4d81 100644 --- a/canopeum_frontend/src/components/settings/AdminCard.tsx +++ b/canopeum_frontend/src/components/settings/AdminCard.tsx @@ -19,7 +19,13 @@ const AdminCard = ({ admin }: Props) => (
{admin.sites.map(site => (
- school + { + /* See TODO + + {getSiteTypeIconKey(site.siteType.id)} + */ + } + (TODO: Add site icon here) {site.name}
))} diff --git a/canopeum_frontend/src/components/social/SiteSocialHeader.tsx b/canopeum_frontend/src/components/social/SiteSocialHeader.tsx index d9c995696..bd60eaffe 100644 --- a/canopeum_frontend/src/components/social/SiteSocialHeader.tsx +++ b/canopeum_frontend/src/components/social/SiteSocialHeader.tsx @@ -10,6 +10,7 @@ import IconBadge from '@components/IconBadge' import ToggleSwitch from '@components/inputs/ToggleSwitch' import useApiClient from '@hooks/ApiClientHook' import type { PageViewMode } from '@models/PageViewMode.type' +import { getSiteTypeIconKey } from '@models/SiteType' import { PatchedUpdateSitePublicStatus, type SiteSocial, User } from '@services/api' import { getApiBaseUrl } from '@services/apiSettings' @@ -120,7 +121,7 @@ const SiteSocialHeader = ({ site, viewMode }: Props) => {
- +

{translateValue(site.siteType)}

diff --git a/canopeum_frontend/src/models/SiteType.ts b/canopeum_frontend/src/models/SiteType.ts new file mode 100644 index 000000000..734010435 --- /dev/null +++ b/canopeum_frontend/src/models/SiteType.ts @@ -0,0 +1,24 @@ +// This mapping MUST MATCH site_type_names in +// canopeum_backend/canopeum_backend/management/commands/initialize_database.py +const SITE_TYPE_ID_TO_ICON_KEY = { + 1: 'eco', // Canopeum // TODO: Update to proper icon + 2: 'forest', // Parks + 3: 'workspaces', // Indigenous community + 4: 'school', // Educational Facility + 5: 'psychiatry', // Farms Land // TODO: Update to proper icon + 6: 'source_environment', // Corporate Lot +} as const +export const getSiteTypeIconKey = (siteTypeId: number): SiteTypeIconKey => { + const iconKey = SITE_TYPE_ID_TO_ICON_KEY[siteTypeId as SiteTypeID] + /* eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + -- Additional runtime safety */ + if (!iconKey) { + throw new RangeError(`${siteTypeId} is not a known site type ID`) + } + + return iconKey +} +export type SiteTypeID = keyof typeof SITE_TYPE_ID_TO_ICON_KEY +export type SiteTypeIconKey = typeof SITE_TYPE_ID_TO_ICON_KEY[SiteTypeID] +export const SITE_TYPE_ICON_KEYS = Object.values(SITE_TYPE_ID_TO_ICON_KEY) +export const SITE_TYPE_IDS = Object.keys(SITE_TYPE_ID_TO_ICON_KEY).map(Number) as SiteTypeID[] diff --git a/canopeum_frontend/src/pages/Map.tsx b/canopeum_frontend/src/pages/Map.tsx index cc691f65d..2a6475270 100644 --- a/canopeum_frontend/src/pages/Map.tsx +++ b/canopeum_frontend/src/pages/Map.tsx @@ -4,26 +4,13 @@ import { useCallback, useEffect, useState } from 'react' import ReactMap, { GeolocateControl, Marker, NavigationControl, ScaleControl, type ViewState } from 'react-map-gl/maplibre' import { Link } from 'react-router-dom' -import CanopeumPin from '@assets/icons/pins/canopeum-pin.svg' -import CorporateLotPin from '@assets/icons/pins/corporate-lot-pin.svg' -import EducationalFacilityPin from '@assets/icons/pins/educational-facility-pin.svg' -import FarmsLandPin from '@assets/icons/pins/farms-land-pin.svg' -import IndegeniousCommunityPin from '@assets/icons/pins/indegenious-community-pin.svg' -import ParkPin from '@assets/icons/pins/park-pin.svg' +import SiteTypePin from '@components/assets/SiteTypePin' import { appRoutes } from '@constants/routes.constant' import useApiClient from '@hooks/ApiClientHook' +import { getSiteTypeIconKey, type SiteTypeID } from '@models/SiteType' import type { SiteMap } from '@services/api' import { getApiBaseUrl } from '@services/apiSettings' -const pinMap: Record = { - 1: CanopeumPin, - 2: ParkPin, - 3: IndegeniousCommunityPin, - 4: EducationalFacilityPin, - 5: FarmsLandPin, - 6: CorporateLotPin, -} - type MarkerEvent = { target: { _lngLat: { @@ -100,7 +87,7 @@ const Map = () => { onClick={event => onMarkerClick(event, site)} style={{ cursor: 'pointer' }} > - + ))} @@ -133,7 +120,9 @@ const Map = () => {
{site.name}
- school + + {getSiteTypeIconKey(site.siteType.id)} + {site.siteType.en}
diff --git a/canopeum_frontend/src/pages/Utilities.tsx b/canopeum_frontend/src/pages/Utilities.tsx index 002396ae1..3403ad3ab 100644 --- a/canopeum_frontend/src/pages/Utilities.tsx +++ b/canopeum_frontend/src/pages/Utilities.tsx @@ -4,6 +4,7 @@ import facebookLogo from '@assets/icons/facebook-regular.svg' import canopeumLogo from '@assets/images/Canopeum_Logo.jpg' import IconBadge from '@components/IconBadge' +import { getSiteTypeIconKey, SITE_TYPE_IDS } from '@models/SiteType' const Utilities = () => (
@@ -19,9 +20,7 @@ const Utilities = () => ( pin_drop account_circle account_circle - eco - eco - sms + sms sms mood mood @@ -41,29 +40,33 @@ const Utilities = () => ( add cancel cancel - source_environment - source_environment location_on location_on person person - forest - forest - workspaces - workspaces - school - school - psychiatry - psychiatry iconHome + +

Site Type Icons

+ {SITE_TYPE_IDS.map(siteTypeId => { + const key = getSiteTypeIconKey(siteTypeId) + + return ( + <> + {key} + {key} + {key} + + ) + })}

Badges

- - - - + {SITE_TYPE_IDS.map(siteTypeId => { + const key = getSiteTypeIconKey(siteTypeId) + + return + })}