From 35b1b68e997abca3b617a47d36f07a11f8a46e81 Mon Sep 17 00:00:00 2001 From: Grigorii Prudnikov Date: Sun, 5 Nov 2023 17:43:00 +0500 Subject: [PATCH] Fix links in copyright --- components/Layers/Filters.config.tsx | 22 +++++++++---------- .../Quarter/CardContent/CardContent.tsx | 2 +- components/UI/Copyright/Copyright.tsx | 17 +++++++------- constants/sources.ts | 4 ++-- types/Filters.types.ts | 2 +- 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/components/Layers/Filters.config.tsx b/components/Layers/Filters.config.tsx index a19012b7..65081772 100644 --- a/components/Layers/Filters.config.tsx +++ b/components/Layers/Filters.config.tsx @@ -1,13 +1,12 @@ -import React from 'react'; +import { DTPFilter } from 'components/Layers/DTP/Filter/DTPFilter'; +import { DesignCodeFilter } from 'components/Layers/DesignCode/Filter/DesignCodeFilter'; import { HouseAgeFilter } from 'components/Layers/Houses/Filter/Age/HouseAgeFilter'; import { HouseFloorFilter } from 'components/Layers/Houses/Filter/Floor/HouseFloorFilter'; import { HouseWearTearFilter } from 'components/Layers/Houses/Filter/WearTear/HouseWearTearFilter'; -import { DesignCodeFilter } from 'components/Layers/DesignCode/Filter/DesignCodeFilter'; -import { OknFilter } from 'components/Layers/OKN/Filter/Okn/OknFilter'; import { LinesFilter } from 'components/Layers/Lines/Filter/LinesFilter'; -import { DTPFilter } from 'components/Layers/DTP/Filter/DTPFilter'; -import { SOURCES_BY_TYPE } from 'constants/sources'; +import { OknFilter } from 'components/Layers/OKN/Filter/Okn/OknFilter'; import { QuarterFilter } from 'components/Layers/Quarter/Filter/QuarterFilter'; +import { SOURCES_BY_TYPE } from 'constants/sources'; import { FilterConfig, FilterType } from '../../types/Filters.types'; // @ts-ignore @@ -15,37 +14,37 @@ export const FILTERS_CONFIG: FilterConfig = { [FilterType.HouseAge]: { title: 'Возраст домов', component: , - source: SOURCES_BY_TYPE.howoldthishouse, + source: [SOURCES_BY_TYPE.howoldthishouse], isVerified: false, }, [FilterType.HouseFloor]: { title: 'Этажность домов', component: , - source: SOURCES_BY_TYPE.howoldthishouse, + source: [SOURCES_BY_TYPE.mingkh, SOURCES_BY_TYPE.domaekb], isVerified: false, }, [FilterType.HouseWearTear]: { title: 'Степень износа домов', component: , - source: SOURCES_BY_TYPE.howoldthishouse, + source: [SOURCES_BY_TYPE.mingkh, SOURCES_BY_TYPE.domaekb], isVerified: false, }, [FilterType.OKN]: { title: 'Объекты культурного наследия', component: , - source: SOURCES_BY_TYPE.okn, + source: [SOURCES_BY_TYPE.okn], isVerified: false, }, [FilterType.DesignCode]: { title: '«Дизайн-код Екатеринбурга»', component: , - source: SOURCES_BY_TYPE.ekaterinburgdesign, + source: [SOURCES_BY_TYPE.ekaterinburgdesign], isVerified: true, }, [FilterType.DTP]: { title: 'ДТП', component: , - source: SOURCES_BY_TYPE.dtp, + source: [SOURCES_BY_TYPE.dtp], isVerified: true, }, [FilterType.Line]: { @@ -56,6 +55,7 @@ export const FILTERS_CONFIG: FilterConfig = { [FilterType.Quarter]: { title: 'Квартальные', component: , + source: [SOURCES_BY_TYPE.ekb_quarter], isVerified: true, }, }; diff --git a/components/Layers/Quarter/CardContent/CardContent.tsx b/components/Layers/Quarter/CardContent/CardContent.tsx index 4ef7b4ab..d42244f3 100644 --- a/components/Layers/Quarter/CardContent/CardContent.tsx +++ b/components/Layers/Quarter/CardContent/CardContent.tsx @@ -54,7 +54,7 @@ export function QuarterCardContent({ placemark }: QuarterCardContentProps) {
- +
diff --git a/components/UI/Copyright/Copyright.tsx b/components/UI/Copyright/Copyright.tsx index e41404ed..c3e9f058 100644 --- a/components/UI/Copyright/Copyright.tsx +++ b/components/UI/Copyright/Copyright.tsx @@ -16,14 +16,15 @@ export function Copyright() { OpenStreetMap - {copyright && ( - <> - {' · '} - - {new URL(copyright.link).host} - - - )} + {copyright && + copyright.map((elem) => ( + <> + {' · '} + + {elem.name} + + + ))}
); } diff --git a/constants/sources.ts b/constants/sources.ts index 719a224b..dfbf9e82 100644 --- a/constants/sources.ts +++ b/constants/sources.ts @@ -21,7 +21,7 @@ export const SOURCES_BY_TYPE = { }, ekaterinburgdesign: { name: 'Дизайн-код Ектеринбурга', - link: 'https://ekaterinburg.design', + link: 'https://map.ekaterinburg.design', data: 'https://map.ekaterinburg.design/api/map', }, dtp: { @@ -29,7 +29,7 @@ export const SOURCES_BY_TYPE = { link: 'https://dtp-stat.ru/', data: 'https://dtp-stat.ru/opendata', }, - ekb: { + ekb_quarter: { name: 'екатеринбург.рф', link: 'https://екатеринбург.рф/справка/квартальные', data: null, diff --git a/types/Filters.types.ts b/types/Filters.types.ts index 236757e9..b7e1a45b 100644 --- a/types/Filters.types.ts +++ b/types/Filters.types.ts @@ -20,7 +20,7 @@ export enum FilterType { export interface FilterConfigItem { title: string; component: ReactNode; - source?: Source; + source?: Source[]; isVerified: boolean; }