From f7aa038a8b41f64f709501e680db1807e0c3c47b Mon Sep 17 00:00:00 2001 From: zojgame Date: Tue, 9 Apr 2024 18:36:32 +0500 Subject: [PATCH] infrastructure marks --- src/components/DistanceCircle.tsx | 37 +-- src/components/MarksContainer.tsx | 10 +- .../icons/marks/MarkEducationIcon.tsx | 36 +++ src/components/icons/marks/MarkFoodIcon.tsx | 10 +- src/components/icons/marks/MarkHeathyIcon.tsx | 22 ++ src/marks.json | 269 ++++++++++++++++-- src/pages/Infra2Page.tsx | 5 +- 7 files changed, 318 insertions(+), 71 deletions(-) create mode 100644 src/components/icons/marks/MarkEducationIcon.tsx create mode 100644 src/components/icons/marks/MarkHeathyIcon.tsx diff --git a/src/components/DistanceCircle.tsx b/src/components/DistanceCircle.tsx index 0a53f4e..a0facb1 100644 --- a/src/components/DistanceCircle.tsx +++ b/src/components/DistanceCircle.tsx @@ -17,6 +17,7 @@ const DistanceCircle = ({ selectedRange }: DistanceCircleProps) => { width={(0.8 * 1600 * selectedRange) / 850} x={1080 - (0.8 * 1600 * selectedRange) / 1700} y={0} + style={{ transition: "all .3s ease" }} viewBox="0 0 1600 1600" fill="none" xmlns="http://www.w3.org/2000/svg" @@ -49,40 +50,4 @@ const DistanceCircle = ({ selectedRange }: DistanceCircleProps) => { ); }; -// const DistanceCircle = ({ selectedRange }: DistanceCircleProps) => { -// return ( -// -// -// -// -// -// -// -// -// -// -// ); -// }; - export default DistanceCircle; diff --git a/src/components/MarksContainer.tsx b/src/components/MarksContainer.tsx index 77ab0c5..7f0b468 100644 --- a/src/components/MarksContainer.tsx +++ b/src/components/MarksContainer.tsx @@ -1,10 +1,14 @@ import { Mark } from "../types/Mark"; +import MarkEducationIcon from "./icons/marks/MarkEducationIcon"; import MarkFoodIcon from "./icons/marks/MarkFoodIcon"; +import MarkHeathyIcon from "./icons/marks/MarkHeathyIcon"; import MarkShopIcon from "./icons/marks/MarkShopIcon"; const markIcons: { [key: string]: React.ReactNode } = { shop: , food: , + heathy: , + education: , }; interface MarksContainerProps { @@ -17,8 +21,8 @@ interface MarksContainerProps { function MarksContainer({ marks, filteredMarks, - markWidth = 64, - markHeigth = 64, + markWidth = 52, + markHeigth = 52, }: MarksContainerProps) { return ( { + return ( + + + + + + + + ); +}; + +export default MarkEducationIcon; diff --git a/src/components/icons/marks/MarkFoodIcon.tsx b/src/components/icons/marks/MarkFoodIcon.tsx index b384bbb..b845908 100644 --- a/src/components/icons/marks/MarkFoodIcon.tsx +++ b/src/components/icons/marks/MarkFoodIcon.tsx @@ -1,12 +1,6 @@ function MarkFoodIcon() { return ( - + <> - + ); } diff --git a/src/components/icons/marks/MarkHeathyIcon.tsx b/src/components/icons/marks/MarkHeathyIcon.tsx new file mode 100644 index 0000000..d2c017b --- /dev/null +++ b/src/components/icons/marks/MarkHeathyIcon.tsx @@ -0,0 +1,22 @@ +function MarkHeathyIcon() { + return ( + + + + ); +} + +export default MarkHeathyIcon; diff --git a/src/marks.json b/src/marks.json index 6705fbe..6a2a077 100644 --- a/src/marks.json +++ b/src/marks.json @@ -1,25 +1,4 @@ [ - { - "id": "shop_1", - "x": 900, - "y": 1000, - "icon": "shop", - "distance": 200 - }, - { - "id": "shop_2", - "x": 666, - "y": 777, - "icon": "shop", - "distance": 200 - }, - { - "id": "shop_3", - "x": 500, - "y": 900, - "icon": "shop", - "distance": 200 - }, { "id": "food_1", "label": "Сезоны", @@ -123,5 +102,253 @@ "y": 1190, "icon": "food", "distance": 400 + }, + { + "id": "food_14", + "label": "Monk", + "x": 1240, + "y": 1340, + "icon": "food", + "distance": 500 + }, + { + "id": "food_15", + "label": "Simple Coffee", + "x": 1350, + "y": 1360, + "icon": "food", + "distance": 600 + }, + { + "id": "food_16", + "label": "Негодяи", + "x": 1420, + "y": 1270, + "icon": "food", + "distance": 600 + }, + { + "id": "food_17", + "label": "Своя компания", + "x": 1100, + "y": 1420, + "icon": "food", + "distance": 550 + }, + { + "id": "food_18", + "label": "Tenet", + "x": 1480, + "y": 1250, + "icon": "food", + "distance": 650 + }, + { + "id": "food_19", + "label": "Кстати", + "x": 1150, + "y": 1460, + "icon": "food", + "distance": 600 + }, + { + "id": "food_20", + "label": "Сенатор", + "x": 720, + "y": 1320, + "icon": "food", + "distance": 600 + }, + { + "id": "food_21", + "label": "Crab", + "x": 600, + "y": 1130, + "icon": "food", + "distance": 650 + }, + { + "id": "food_22", + "label": "Гастроли", + "x": 1520, + "y": 940, + "icon": "food", + "distance": 700 + }, + { + "id": "food_23", + "label": "Рада", + "x": 1540, + "y": 1170, + "icon": "food", + "distance": 700 + }, + { + "id": "food_24", + "label": "Геге", + "x": 1530, + "y": 890, + "icon": "food", + "distance": 700 + }, + { + "id": "food_25", + "label": "Мята Lounge", + "x": 1580, + "y": 1230, + "icon": "food", + "distance": 750 + }, + { + "id": "food_26", + "label": "Нячанг сити", + "x": 1550, + "y": 1330, + "icon": "food", + "distance": 800 + }, + { + "id": "shop_1", + "label": "Европа", + "x": 1470, + "y": 1070, + "icon": "shop", + "distance": 600 + }, + { + "id": "shop_2", + "label": "Пассаж", + "x": 1570, + "y": 1150, + "icon": "shop", + "distance": 750 + }, + { + "id": "shop_3", + "label": "Успенский", + "x": 1520, + "y": 1200, + "icon": "shop", + "distance": 700 + }, + { + "id": "shop_4", + "label": "Московский", + "x": 1140, + "y": 1460, + "icon": "shop", + "distance": 600 + }, + { + "id": "heathy_1", + "label": "Центр косметологии и пластической хирургии", + "x": 1010, + "y": 1340, + "icon": "heathy", + "distance": 400 + }, + { + "id": "heathy_2", + "label": "Поликлиника №2", + "x": 900, + "y": 1290, + "icon": "heathy", + "distance": 400 + }, + { + "id": "heathy_3", + "label": "Больница №2 им. Миславского", + "x": 780, + "y": 1170, + "icon": "heathy", + "distance": 450 + }, + { + "id": "heathy_4", + "label": "ЦГБ №2", + "x": 860, + "y": 1050, + "icon": "heathy", + "distance": 300 + }, + { + "id": "heathy_5", + "label": "Медиаком", + "x": 850, + "y": 870, + "icon": "heathy", + "distance": 400 + }, + { + "id": "heathy_6", + "label": "Детская поликлиника", + "x": 1480, + "y": 850, + "icon": "heathy", + "distance": 650 + }, + { + "id": "heathy_7", + "label": "Больница №2", + "x": 1520, + "y": 810, + "icon": "heathy", + "distance": 750 + }, + { + "id": "heathy_8", + "label": "База стоматологической поликлиники", + "x": 1360, + "y": 1330, + "icon": "heathy", + "distance": 600 + }, + { + "id": "heathy_9", + "label": "Бонум", + "x": 1280, + "y": 1520, + "icon": "heathy", + "distance": 700 + }, + { + "id": "education_1", + "label": "Детский сад №9", + "x": 1120, + "y": 1160, + "icon": "education", + "distance": 200 + }, + { + "id": "education_2", + "label": "Детский сад №582", + "x": 1280, + "y": 1020, + "icon": "education", + "distance": 350 + }, + { + "id": "education_3", + "label": "Детский сад №9", + "x": 1220, + "y": 1260, + "icon": "education", + "distance": 400 + }, + { + "id": "education_4", + "label": "Музыкальный колледж", + "x": 1190, + "y": 1300, + "icon": "education", + "distance": 400 + }, + { + "id": "education_5", + "label": "Театральный институт", + "x": 1420, + "y": 1080, + "icon": "education", + "distance": 500 } ] diff --git a/src/pages/Infra2Page.tsx b/src/pages/Infra2Page.tsx index bdc10dd..12af7ad 100644 --- a/src/pages/Infra2Page.tsx +++ b/src/pages/Infra2Page.tsx @@ -41,9 +41,8 @@ function Infra2Page() { className="" /> -
- -
+ +