From c3e493d6a3e1736c00c18fba16b79b7107492701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Or=C4=99ziak?= Date: Sat, 25 Mar 2023 21:50:22 +0100 Subject: [PATCH] Add ConfigSoonWrapper --- src/components/app/ComingSoonWrapper.tsx | 14 ++++++ .../filters/PublicTransportFilter.tsx | 37 +++++++------- .../filters/RecruitmentPointsFilter.tsx | 49 +++++++++++-------- .../filters/WarsawDistrictsFilter.tsx | 9 ++-- 4 files changed, 68 insertions(+), 41 deletions(-) create mode 100644 src/components/app/ComingSoonWrapper.tsx diff --git a/src/components/app/ComingSoonWrapper.tsx b/src/components/app/ComingSoonWrapper.tsx new file mode 100644 index 0000000..b246f10 --- /dev/null +++ b/src/components/app/ComingSoonWrapper.tsx @@ -0,0 +1,14 @@ +const ComingSoonWrapper = ({ children }) => ( +
+
{children}
+
+ Dostępne wkrótce! + + Działanie tego widżetu w wersji beta aplikacji może być chwilowo ograniczone lub może dawać + on błędne rezultaty. + +
+
+); + +export default ComingSoonWrapper; diff --git a/src/components/app/MapSearchPage/filters/PublicTransportFilter.tsx b/src/components/app/MapSearchPage/filters/PublicTransportFilter.tsx index 8cb7a17..05b663c 100644 --- a/src/components/app/MapSearchPage/filters/PublicTransportFilter.tsx +++ b/src/components/app/MapSearchPage/filters/PublicTransportFilter.tsx @@ -6,6 +6,7 @@ import { MdTrain } from '@react-icons/all-files/md/MdTrain'; import { MdTram } from '@react-icons/all-files/md/MdTram'; import { MdSubway } from '@react-icons/all-files/md/MdSubway'; import { toggleElementInArray } from '../../../../utils/misc'; +import ComingSoonWrapper from '../../ComingSoonWrapper'; const stationTypes = [ { @@ -42,23 +43,25 @@ const PublicTransportFilter: FC> = ({ value, setValue }) = return ( - {'<'}500m od szkoły znajduje się: -
    - {stationTypes.map(({ name, id, icon: Icon }) => ( -
  • - -
  • - ))} -
+ + {'<'}500m od szkoły znajduje się: +
    + {stationTypes.map(({ name, id, icon: Icon }) => ( +
  • + +
  • + ))} +
+
); }; diff --git a/src/components/app/MapSearchPage/filters/RecruitmentPointsFilter.tsx b/src/components/app/MapSearchPage/filters/RecruitmentPointsFilter.tsx index e5273c1..6e0269c 100644 --- a/src/components/app/MapSearchPage/filters/RecruitmentPointsFilter.tsx +++ b/src/components/app/MapSearchPage/filters/RecruitmentPointsFilter.tsx @@ -1,21 +1,18 @@ import { ChangeEventHandler, FC, useEffect, useState } from 'react'; import { FilterProps } from './types'; import CollapsibleFilterWrapper from './CollapsibleFilterWrapper'; -import Link from 'next/link'; import { AiOutlineWarning } from '@react-icons/all-files/ai/AiOutlineWarning'; import { getTrackBackground, Range } from 'react-range'; import { IRenderThumbParams, IRenderTrackParams } from 'react-range/lib/types'; +import ComingSoonWrapper from '../../ComingSoonWrapper'; const RecruitmentPointsAlert = () => ( - Progi punktowe zmieniają - się co roku i zależą od wielu czynników.{' '} - - Dowiedz się więcej - + + Progi punktowe zmieniają się co roku i zależą od wielu czynników. ); @@ -68,23 +65,33 @@ const RecruitmentPointsFilter: FC> = ({ value, set return ( - -
- -
- + +
+ +
+ +
+
- -
+ ); }; diff --git a/src/components/app/MapSearchPage/filters/WarsawDistrictsFilter.tsx b/src/components/app/MapSearchPage/filters/WarsawDistrictsFilter.tsx index 65ef13c..4736f74 100644 --- a/src/components/app/MapSearchPage/filters/WarsawDistrictsFilter.tsx +++ b/src/components/app/MapSearchPage/filters/WarsawDistrictsFilter.tsx @@ -3,14 +3,17 @@ import { FilterProps } from './types'; import WarsawDistrictsMap from '../../../../assets/app/svg/WarsawDistrictsMap'; import styles from './styles/WarsawDistrictsFilter.module.css'; import CollapsibleFilterWrapper from './CollapsibleFilterWrapper'; +import ComingSoonWrapper from '../../ComingSoonWrapper'; const WarsawDistrictsFilter: FC> = () => { return (
-
- -
+ +
+ +
+
);