Skip to content

Commit

Permalink
Fix links in copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriiPrudnikov committed Nov 5, 2023
1 parent 01f94fa commit 35b1b68
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 23 deletions.
22 changes: 11 additions & 11 deletions components/Layers/Filters.config.tsx
Original file line number Diff line number Diff line change
@@ -1,51 +1,50 @@
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
export const FILTERS_CONFIG: FilterConfig = {
[FilterType.HouseAge]: {
title: 'Возраст домов',
component: <HouseAgeFilter />,
source: SOURCES_BY_TYPE.howoldthishouse,
source: [SOURCES_BY_TYPE.howoldthishouse],
isVerified: false,
},
[FilterType.HouseFloor]: {
title: 'Этажность домов',
component: <HouseFloorFilter />,
source: SOURCES_BY_TYPE.howoldthishouse,
source: [SOURCES_BY_TYPE.mingkh, SOURCES_BY_TYPE.domaekb],
isVerified: false,
},
[FilterType.HouseWearTear]: {
title: 'Степень износа домов',
component: <HouseWearTearFilter />,
source: SOURCES_BY_TYPE.howoldthishouse,
source: [SOURCES_BY_TYPE.mingkh, SOURCES_BY_TYPE.domaekb],
isVerified: false,
},
[FilterType.OKN]: {
title: 'Объекты культурного наследия',
component: <OknFilter />,
source: SOURCES_BY_TYPE.okn,
source: [SOURCES_BY_TYPE.okn],
isVerified: false,
},
[FilterType.DesignCode]: {
title: '«Дизайн-код Екатеринбурга»',
component: <DesignCodeFilter />,
source: SOURCES_BY_TYPE.ekaterinburgdesign,
source: [SOURCES_BY_TYPE.ekaterinburgdesign],
isVerified: true,
},
[FilterType.DTP]: {
title: 'ДТП',
component: <DTPFilter />,
source: SOURCES_BY_TYPE.dtp,
source: [SOURCES_BY_TYPE.dtp],
isVerified: true,
},
[FilterType.Line]: {
Expand All @@ -56,6 +55,7 @@ export const FILTERS_CONFIG: FilterConfig = {
[FilterType.Quarter]: {
title: 'Квартальные',
component: <QuarterFilter />,
source: [SOURCES_BY_TYPE.ekb_quarter],
isVerified: true,
},
};
2 changes: 1 addition & 1 deletion components/Layers/Quarter/CardContent/CardContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function QuarterCardContent({ placemark }: QuarterCardContentProps) {
</Section>

<Section>
<Sources sources={['ekb']} />
<Sources sources={['ekb_quarter']} />
</Section>
<Section>
<div className={sectionStyles.block_inline}>
Expand Down
17 changes: 9 additions & 8 deletions components/UI/Copyright/Copyright.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ export function Copyright() {
<a href="https://www.openstreetmap.org/" target="_blank" rel="noreferrer">
OpenStreetMap
</a>
{copyright && (
<>
{' · '}
<a href={copyright} target="_blank" rel="noreferrer">
{new URL(copyright.link).host}
</a>
</>
)}
{copyright &&
copyright.map((elem) => (
<>
{' · '}
<a href={elem.link} target="_blank" rel="noreferrer">
{elem.name}
</a>
</>
))}
</div>
);
}
4 changes: 2 additions & 2 deletions constants/sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ export const SOURCES_BY_TYPE = {
},
ekaterinburgdesign: {
name: 'Дизайн-код Ектеринбурга',
link: 'https://ekaterinburg.design',
link: 'https://map.ekaterinburg.design',
data: 'https://map.ekaterinburg.design/api/map',
},
dtp: {
name: 'Карта ДТП',
link: 'https://dtp-stat.ru/',
data: 'https://dtp-stat.ru/opendata',
},
ekb: {
ekb_quarter: {
name: 'екатеринбург.рф',
link: 'https://екатеринбург.рф/справка/квартальные',
data: null,
Expand Down
2 changes: 1 addition & 1 deletion types/Filters.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export enum FilterType {
export interface FilterConfigItem {
title: string;
component: ReactNode;
source?: Source;
source?: Source[];
isVerified: boolean;
}

Expand Down

1 comment on commit 35b1b68

@ekbdev
Copy link

@ekbdev ekbdev commented on 35b1b68 Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for map ready!

✅ Preview
https://map-f3lfbpo48-ekbdev.vercel.app
https://ekbdev-map-copyright-fix.vercel.app

Built with commit 35b1b68.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.