eslint bug fixed

This commit is contained in:
Samandar Turgunboyev
2025-12-01 09:20:18 +05:00
parent 9bc4c3df1f
commit 40036322cb
8 changed files with 40 additions and 31 deletions

View File

@@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/fias.svg" />
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FIAS - React Js app</title>
<title>MERIDYN PHARM</title>
</head>
<body>
<div id="root"></div>

9
public/logo.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 110 KiB

View File

@@ -240,7 +240,7 @@ const AddedDoctor = ({ initialValues, setDialogOpen }: Props) => {
}
})();
}
}, [initialValues]);
}, [initialValues, form]);
const handleMapClick = (
e: ymaps.IEvent<MouseEvent, { coords: [number, number] }>,

View File

@@ -172,7 +172,7 @@ export default function AddedObject({ initialValues, setDialogOpen }: Props) {
}
})();
}
}, [initialValues]);
}, [initialValues, form]);
const handleMapClick = (
e: ymaps.IEvent<MouseEvent, { coords: [number, number] }>,

View File

@@ -203,7 +203,7 @@ const AddedPharmacies = ({ initialValues, setDialogOpen }: Props) => {
}
})();
}
}, [initialValues]);
}, [initialValues, form]);
const handleMapClick = (
e: ymaps.IEvent<MouseEvent, { coords: [number, number] }>,

View File

@@ -1,4 +1,4 @@
import React, { useEffect } from 'react';
import React, { useEffect } from "react";
/**
* Hook for closing some items when they are unnecessary to the user
@@ -27,13 +27,13 @@ const useCloser = (
}
}
document.addEventListener('mousedown', handleClickOutside);
document.addEventListener('scroll', handleScroll);
document.addEventListener("mousedown", handleClickOutside);
document.addEventListener("scroll", handleScroll);
return () => {
document.removeEventListener('mousedown', handleClickOutside);
document.removeEventListener('scroll', handleScroll);
document.removeEventListener("mousedown", handleClickOutside);
document.removeEventListener("scroll", handleScroll);
};
}, [ref, closeFunction]);
}, [ref, closeFunction, scrollClose]);
};
export default useCloser;

View File

@@ -1,5 +1,5 @@
import i18n from '@/shared/config/i18n';
import { LanguageRoutes } from '@/shared/config/i18n/type';
import i18n from "@/shared/config/i18n";
import { LanguageRoutes } from "@/shared/config/i18n/type";
/**
* Format price. With label.
@@ -10,20 +10,20 @@ import { LanguageRoutes } from '@/shared/config/i18n/type';
const formatPrice = (amount: number | string, withLabel?: boolean) => {
const locale = i18n.language;
const label = withLabel
? locale == LanguageRoutes.RU
? ' сум'
: locale == LanguageRoutes.KI
? ' сўм'
: ' som'
: '';
const parts = String(amount).split('.');
? locale === LanguageRoutes.RU
? " сум"
: locale === LanguageRoutes.KI
? " сўм"
: " som"
: "";
const parts = String(amount).split(".");
const dollars = parts[0];
const cents = parts.length > 1 ? parts[1] : '00';
const cents = parts.length > 1 ? parts[1] : "00";
const formattedDollars = dollars.replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
const formattedDollars = dollars.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
if (String(amount).length == 0) {
return formattedDollars + '.' + cents + label;
if (String(amount).length === 0) {
return formattedDollars + "." + cents + label;
} else {
return formattedDollars + label;
}

View File

@@ -1,14 +1,14 @@
import { LanguageRoutes } from '@/shared/config/i18n/type';
import { Button } from '@/shared/ui/button';
import { LanguageRoutes } from "@/shared/config/i18n/type";
import { Button } from "@/shared/ui/button";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from '@/shared/ui/dropdown-menu';
import { languages } from '@/widgets/lang-toggle/lib/data';
import { GlobeIcon } from 'lucide-react';
import { useTranslation } from 'react-i18next';
} from "@/shared/ui/dropdown-menu";
import { languages } from "@/widgets/lang-toggle/lib/data";
import { GlobeIcon } from "lucide-react";
import { useTranslation } from "react-i18next";
const LangToggle = () => {
const { i18n } = useTranslation();
@@ -21,7 +21,7 @@ const LangToggle = () => {
<DropdownMenuTrigger asChild>
<Button variant="outline">
<GlobeIcon />
<span>{languages.find((e) => e.key == i18n.language)?.name}</span>
<span>{languages.find((e) => e.key === i18n.language)?.name}</span>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">