diff --git a/src/components/Mark.tsx b/src/components/Mark.tsx
deleted file mode 100644
index 6bbbb36..0000000
--- a/src/components/Mark.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-function Mark() {
- return
Mark
;
-}
-
-export default Mark;
diff --git a/src/components/Marks.tsx b/src/components/Marks.tsx
deleted file mode 100644
index 0915175..0000000
--- a/src/components/Marks.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-const Marks = () => {
- return (
-
- );
-};
-
-export default Marks;
diff --git a/src/components/MarksContainer.tsx b/src/components/MarksContainer.tsx
index a8e7ad5..7f0b468 100644
--- a/src/components/MarksContainer.tsx
+++ b/src/components/MarksContainer.tsx
@@ -1,22 +1,28 @@
+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";
-interface Mark {
- id: string;
- icon: string;
- x: number;
- y: number;
-}
+const markIcons: { [key: string]: React.ReactNode } = {
+ shop:
,
+ food:
,
+ heathy:
,
+ education:
,
+};
interface MarksContainerProps {
marks: Mark[];
+ filteredMarks: Mark[];
markWidth?: number;
markHeigth?: number;
}
function MarksContainer({
marks,
- markWidth = 64,
- markHeigth = 64,
+ filteredMarks,
+ markWidth = 52,
+ markHeigth = 52,
}: MarksContainerProps) {
return (
);
})}
diff --git a/src/icons/BusIcon.tsx b/src/components/icons/BusIcon.tsx
similarity index 100%
rename from src/icons/BusIcon.tsx
rename to src/components/icons/BusIcon.tsx
diff --git a/src/icons/CrossIcon.tsx b/src/components/icons/CrossIcon.tsx
similarity index 100%
rename from src/icons/CrossIcon.tsx
rename to src/components/icons/CrossIcon.tsx
diff --git a/src/icons/EducationIcon.tsx b/src/components/icons/EducationIcon.tsx
similarity index 100%
rename from src/icons/EducationIcon.tsx
rename to src/components/icons/EducationIcon.tsx
diff --git a/src/icons/HealthyIcon.tsx b/src/components/icons/HealthyIcon.tsx
similarity index 100%
rename from src/icons/HealthyIcon.tsx
rename to src/components/icons/HealthyIcon.tsx
diff --git a/src/icons/MallIcon.tsx b/src/components/icons/MallIcon.tsx
similarity index 100%
rename from src/icons/MallIcon.tsx
rename to src/components/icons/MallIcon.tsx
diff --git a/src/icons/RestourantIcon.tsx b/src/components/icons/RestourantIcon.tsx
similarity index 100%
rename from src/icons/RestourantIcon.tsx
rename to src/components/icons/RestourantIcon.tsx
diff --git a/src/icons/SportIcon.tsx b/src/components/icons/SportIcon.tsx
similarity index 100%
rename from src/icons/SportIcon.tsx
rename to src/components/icons/SportIcon.tsx
diff --git a/src/icons/TramIcon.tsx b/src/components/icons/TramIcon.tsx
similarity index 100%
rename from src/icons/TramIcon.tsx
rename to src/components/icons/TramIcon.tsx
diff --git a/src/components/icons/marks/MarkEducationIcon.tsx b/src/components/icons/marks/MarkEducationIcon.tsx
new file mode 100644
index 0000000..d7f47b6
--- /dev/null
+++ b/src/components/icons/marks/MarkEducationIcon.tsx
@@ -0,0 +1,36 @@
+const MarkEducationIcon = () => {
+ return (
+
+
+
+
+
+
+
+ );
+};
+
+export default MarkEducationIcon;
diff --git a/src/components/icons/marks/MarkFoodIcon.tsx b/src/components/icons/marks/MarkFoodIcon.tsx
new file mode 100644
index 0000000..b845908
--- /dev/null
+++ b/src/components/icons/marks/MarkFoodIcon.tsx
@@ -0,0 +1,18 @@
+function MarkFoodIcon() {
+ return (
+ <>
+
+
+ >
+ );
+}
+
+export default MarkFoodIcon;
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/components/icons/marks/MarkShopIcon.tsx b/src/components/icons/marks/MarkShopIcon.tsx
index 3f79054..042636e 100644
--- a/src/components/icons/marks/MarkShopIcon.tsx
+++ b/src/components/icons/marks/MarkShopIcon.tsx
@@ -3,8 +3,8 @@ function MarkShopIcon() {
);
}
diff --git a/src/components/maps/Infra.tsx b/src/components/maps/Infra.tsx
deleted file mode 100644
index e69de29..0000000
diff --git a/src/consts/infrastructure.tsx b/src/consts/infrastructure.tsx
index e259070..58842e5 100644
--- a/src/consts/infrastructure.tsx
+++ b/src/consts/infrastructure.tsx
@@ -1,23 +1,23 @@
-import BusIcon from "../icons/BusIcon";
-import EducationIcon from "../icons/EducationIcon";
-import HealthyIcon from "../icons/HealthyIcon";
-import MallIcon from "../icons/MallIcon";
-import RestourauntIcon from "../icons/RestourantIcon";
-import SportIcon from "../icons/SportIcon";
-import TramIcon from "../icons/TramIcon";
+import BusIcon from "../components/icons/BusIcon";
+import EducationIcon from "../components/icons/EducationIcon";
+import HealthyIcon from "../components/icons/HealthyIcon";
+import MallIcon from "../components/icons/MallIcon";
+import RestourauntIcon from "../components/icons/RestourantIcon";
+import SportIcon from "../components/icons/SportIcon";
+import TramIcon from "../components/icons/TramIcon";
import { IInfrastructure } from "../types/Infrastructure";
export const environments: IInfrastructure[] = [
- { id: "1", icon:
, label: "Торговые центры" },
- { id: "2", icon:
, label: "Рестораны" },
- { id: "3", icon:
, label: "Здоровье" },
- { id: "4", icon:
, label: "Образование" },
- { id: "5", icon:
, label: "Спорт" },
+ { id: "1", icon:
, label: "Торговые центры", type: "shop" },
+ { id: "2", icon:
, label: "Рестораны", type: "food" },
+ { id: "3", icon:
, label: "Здоровье", type: "heathy" },
+ { id: "4", icon:
, label: "Образование", type: "education" },
+ { id: "5", icon:
, label: "Спорт", type: "sport" },
];
export const transports: IInfrastructure[] = [
- { id: "6", icon:
, label: "Автобус" },
- { id: "7", icon:
, label: "Трамвай" },
+ { id: "6", icon:
, label: "Автобус", type: "bus" },
+ { id: "7", icon:
, label: "Трамвай", type: "tram" },
];
export const rangeStart = 200;
diff --git a/src/main.tsx b/src/main.tsx
index c360548..32345f6 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -2,7 +2,6 @@ import ReactDOM from "react-dom/client";
import "./index.css";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import VirtualTourPage from "./pages/VirtualTourPage.tsx";
-import InfrastructurePage from "./pages/InfrastructurePage.tsx";
import MainPage from "./pages/MainPage.tsx";
import Infra2Page from "./pages/Infra2Page.tsx";
@@ -15,10 +14,6 @@ const router = createBrowserRouter([
path: "/virtual-tour",
element:
,
},
- {
- path: "/infrastructure",
- element:
,
- },
{
path: "/infra2",
element:
,
diff --git a/src/marks.json b/src/marks.json
index fcb356f..6a2a077 100644
--- a/src/marks.json
+++ b/src/marks.json
@@ -1,26 +1,354 @@
[
+ {
+ "id": "food_1",
+ "label": "Сезоны",
+ "x": 970,
+ "y": 850,
+ "icon": "food",
+ "distance": 300
+ },
+ {
+ "id": "food_2",
+ "label": "Штерн",
+ "x": 920,
+ "y": 1030,
+ "icon": "food",
+ "distance": 200
+ },
+ {
+ "id": "food_3",
+ "label": "Lo Vegano",
+ "x": 1190,
+ "y": 1120,
+ "icon": "food",
+ "distance": 250
+ },
+ {
+ "id": "food_4",
+ "label": "La Coffeina",
+ "x": 1070,
+ "y": 1200,
+ "icon": "food",
+ "distance": 250
+ },
+ {
+ "id": "food_5",
+ "label": "Фартук",
+ "x": 930,
+ "y": 1170,
+ "icon": "food",
+ "distance": 250
+ },
+ {
+ "id": "food_6",
+ "label": "Breadway",
+ "x": 1090,
+ "y": 870,
+ "icon": "food",
+ "distance": 250
+ },
+ {
+ "id": "food_7",
+ "label": "Cucina",
+ "x": 1180,
+ "y": 890,
+ "icon": "food",
+ "distance": 300
+ },
+ {
+ "id": "food_8",
+ "label": "Демидов",
+ "x": 1280,
+ "y": 960,
+ "icon": "food",
+ "distance": 350
+ },
+ {
+ "id": "food_9",
+ "label": "БарБорис",
+ "x": 1090,
+ "y": 770,
+ "icon": "food",
+ "distance": 400
+ },
+ {
+ "id": "food_10",
+ "label": "Барашка на гранате",
+ "x": 1360,
+ "y": 1020,
+ "icon": "food",
+ "distance": 450
+ },
+ {
+ "id": "food_11",
+ "label": "Dorian Gray",
+ "x": 1330,
+ "y": 1140,
+ "icon": "food",
+ "distance": 400
+ },
+ {
+ "id": "food_12",
+ "label": "Витязь",
+ "x": 860,
+ "y": 1240,
+ "icon": "food",
+ "distance": 400
+ },
+ {
+ "id": "food_13",
+ "label": "Coffee&Flowers",
+ "x": 820,
+ "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",
- "x": 900,
- "y": 1000,
- "icon": "shop"
+ "label": "Европа",
+ "x": 1470,
+ "y": 1070,
+ "icon": "shop",
+ "distance": 600
},
{
"id": "shop_2",
- "x": 666,
- "y": 777,
- "icon": "shop"
+ "label": "Пассаж",
+ "x": 1570,
+ "y": 1150,
+ "icon": "shop",
+ "distance": 750
},
{
"id": "shop_3",
- "x": 500,
- "y": 900,
- "icon": "shop"
+ "label": "Успенский",
+ "x": 1520,
+ "y": 1200,
+ "icon": "shop",
+ "distance": 700
},
{
"id": "shop_4",
- "x": 300,
- "y": 500,
- "icon": "shop"
+ "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 3e57052..12af7ad 100644
--- a/src/pages/Infra2Page.tsx
+++ b/src/pages/Infra2Page.tsx
@@ -1,22 +1,20 @@
import { useEffect, useState } from "react";
import MarksContainer from "../components/MarksContainer";
import _marks from "./../marks.json";
-
-interface Mark {
- id: string;
- icon: string;
- x: number;
- y: number;
- width?: number;
- heigth?: number;
-}
+import { Mark } from "../types/Mark";
+import DistanceCircle from "../components/DistanceCircle";
+import Button from "../components/Button";
+import InfrastructureFilters from "../components/InfrastructurePage/InfrastructureFilters";
+import ArrowLeftIcon from "../components/icons/ArrowLeftIcon";
+import CrossIcon from "../components/icons/CrossIcon";
const marks = _marks as Mark[];
function Infra2Page() {
+ const [selectedRange, setSelectedRange] = useState
(800);
const [width, setWidth] = useState();
- // const [heigth, setHeigth] = useState();
const [top, setTop] = useState();
+ const [filteredMarks, setFilteredMarks] = useState(marks);
function handleResize() {
setWidth(window.innerWidth);
@@ -38,11 +36,27 @@ function Infra2Page() {
-
+
+
+
+