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"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <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" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FIAS - React Js app</title> <title>MERIDYN PHARM</title>
</head> </head>
<body> <body>
<div id="root"></div> <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 = ( const handleMapClick = (
e: ymaps.IEvent<MouseEvent, { coords: [number, number] }>, 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 = ( const handleMapClick = (
e: ymaps.IEvent<MouseEvent, { coords: [number, number] }>, e: ymaps.IEvent<MouseEvent, { coords: [number, number] }>,

View File

@@ -203,7 +203,7 @@ const AddedPharmacies = ({ initialValues, setDialogOpen }: Props) => {
} }
})(); })();
} }
}, [initialValues]); }, [initialValues, form]);
const handleMapClick = ( const handleMapClick = (
e: ymaps.IEvent<MouseEvent, { coords: [number, number] }>, 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 * Hook for closing some items when they are unnecessary to the user
@@ -27,13 +27,13 @@ const useCloser = (
} }
} }
document.addEventListener('mousedown', handleClickOutside); document.addEventListener("mousedown", handleClickOutside);
document.addEventListener('scroll', handleScroll); document.addEventListener("scroll", handleScroll);
return () => { return () => {
document.removeEventListener('mousedown', handleClickOutside); document.removeEventListener("mousedown", handleClickOutside);
document.removeEventListener('scroll', handleScroll); document.removeEventListener("scroll", handleScroll);
}; };
}, [ref, closeFunction]); }, [ref, closeFunction, scrollClose]);
}; };
export default useCloser; export default useCloser;

View File

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

View File

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