From c6043cb4887a6ab739a00d1ea3ef43b71a0fafef Mon Sep 17 00:00:00 2001 From: Nikhila C <115739037+NikhilA8606@users.noreply.github.com> Date: Sat, 15 Feb 2025 09:42:49 +0530 Subject: [PATCH] Replaced all deprecated classNames with cn function (#10605) --- src/Utils/utils.ts | 3 --- src/components/Common/LanguageSelector.tsx | 6 ++++-- src/components/Common/LanguageSelectorLogin.tsx | 6 ++++-- src/components/Common/UpdatableApp.tsx | 9 +++------ src/components/Users/UserFormValidations.tsx | 6 +++--- src/components/ui/sidebar/patient-switcher.tsx | 11 +++-------- src/hooks/useFilters.tsx | 6 ++++-- 7 files changed, 21 insertions(+), 26 deletions(-) diff --git a/src/Utils/utils.ts b/src/Utils/utils.ts index add2677343b..7cfcd124993 100644 --- a/src/Utils/utils.ts +++ b/src/Utils/utils.ts @@ -104,9 +104,6 @@ export const isAppleDevice = _isAppleDevice(); * * @deprecated Use `cn` from `@/lib/utils` instead. */ -export const classNames = (...classes: (string | boolean | undefined)[]) => { - return classes.filter(Boolean).join(" "); -}; export const isUserOnline = (user: { last_login: DateLike }) => { return user.last_login diff --git a/src/components/Common/LanguageSelector.tsx b/src/components/Common/LanguageSelector.tsx index e1f3446eca0..a3b9d5c3d5d 100644 --- a/src/components/Common/LanguageSelector.tsx +++ b/src/components/Common/LanguageSelector.tsx @@ -2,7 +2,9 @@ import careConfig from "@careConfig"; import { useEffect } from "react"; import { useTranslation } from "react-i18next"; -import { classNames, keysOf } from "@/Utils/utils"; +import { cn } from "@/lib/utils"; + +import { keysOf } from "@/Utils/utils"; import { LANGUAGES } from "@/i18n"; export const LanguageSelector = (props: any) => { @@ -27,7 +29,7 @@ export const LanguageSelector = (props: any) => { return (