diff --git a/apps/schools/domains/circle/components/createCircleForm/index.tsx b/apps/schools/domains/circle/components/createCircleForm/index.tsx
index 8c0b7788..9b1d419b 100644
--- a/apps/schools/domains/circle/components/createCircleForm/index.tsx
+++ b/apps/schools/domains/circle/components/createCircleForm/index.tsx
@@ -16,7 +16,7 @@ import { Select } from '@domains/common/components/select'
import { handleSubmitForm } from '../../handlers/circleCreate'
import { useCreateCircleMutation } from '../../redux/circleApi'
import { getVarsForAddressColumn } from '@domains/common/utils/geo'
-import AddressForm from "@domains/circle/components/addressForm";
+import AddressForm from '@domains/circle/components/addressForm'
export const CreateCircleForm = () => {
const validators = useCreateCircleFormValidators()
@@ -139,7 +139,7 @@ export const CreateCircleForm = () => {
Родители смогут увидеть ваш кружок с помощью карты и узнать информацию о нём!
-
+
)
}
diff --git a/apps/schools/domains/circle/components/map/hooks.ts b/apps/schools/domains/circle/components/map/hooks.ts
index 9626d323..f6d7b0eb 100644
--- a/apps/schools/domains/circle/components/map/hooks.ts
+++ b/apps/schools/domains/circle/components/map/hooks.ts
@@ -1,17 +1,16 @@
import { useMemo } from 'react'
import { ValidatorsMap } from '@domains/common/redux/interfaces'
-import { PleaseSelectOneOfOptionsMsg } from "@domains/user/components/auth/constants/message";
+import { PleaseSelectOneOfOptionsMsg } from '@domains/user/components/auth/constants/message'
export const useAddressFormValidators = () => {
- return useMemo(() => {
- return {
- city: [
- {
- required: true,
- message: PleaseSelectOneOfOptionsMsg,
+ return useMemo(() => {
+ return {
+ city: [
+ {
+ required: true,
+ message: PleaseSelectOneOfOptionsMsg,
+ },
+ ],
}
- ],
- }
- }, [this])
+ }, [this])
}
-
diff --git a/apps/schools/domains/circle/components/map/index.tsx b/apps/schools/domains/circle/components/map/index.tsx
index f20f1d57..5f5c9f7b 100644
--- a/apps/schools/domains/circle/components/map/index.tsx
+++ b/apps/schools/domains/circle/components/map/index.tsx
@@ -8,8 +8,6 @@ import getConfig from 'next/config'
import { Input } from '@domains/common/components/input'
import { Select } from '@domains/common/components/select'
-
-
const MapComponent = () => {
const {
publicRuntimeConfig: {
@@ -63,10 +61,12 @@ const MapComponent = () => {
if ((accurateAddress.match(/,/g) || []).length === 3) {
const commaIndex = accurateAddress.indexOf(',')
- const currentCity = accurateAddress.substring(commaIndex + 1, accurateAddress.indexOf(',', commaIndex + 1)).trim();
- const newAddress = accurateAddress.substring(accurateAddress.indexOf(',', commaIndex + 1) + 1).trim();
- form.setFieldValue('address', newAddress);
- form.setFieldValue('city', currentCity);
+ const currentCity = accurateAddress
+ .substring(commaIndex + 1, accurateAddress.indexOf(',', commaIndex + 1))
+ .trim()
+ const newAddress = accurateAddress.substring(accurateAddress.indexOf(',', commaIndex + 1) + 1).trim()
+ form.setFieldValue('address', newAddress)
+ form.setFieldValue('city', currentCity)
} else {
const commaIndex = address.indexOf(',')
const currentCity = address.slice(0, commaIndex).trim()
@@ -104,16 +104,16 @@ const MapComponent = () => {
}
const handleCityChange = (e) => {
- const selectedCity = cities.find(city => city.name === e);
+ const selectedCity = cities.find((city) => city.name === e)
if (selectedCity) {
setMapState({
center: selectedCity.coordinates,
zoom: 12,
- });
- form.setFieldValue('city', selectedCity.name);
+ })
+ form.setFieldValue('city', selectedCity.name)
} else {
- console.error('Город не найден');
+ console.error('Город не найден')
}
}
@@ -168,4 +168,4 @@ const MapComponent = () => {
)
}
-export default MapComponent;
+export default MapComponent