From fe1dcd5259e97dd420e942ae3a6bcce71bb52b1a Mon Sep 17 00:00:00 2001 From: Anton Arnautov Date: Mon, 12 Sep 2022 08:46:27 +0200 Subject: [PATCH] fix: remove useId from LoadingIndicatorIcon --- src/components/MessageInput/icons.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/MessageInput/icons.tsx b/src/components/MessageInput/icons.tsx index 9764c6306d..54ac1b7c41 100644 --- a/src/components/MessageInput/icons.tsx +++ b/src/components/MessageInput/icons.tsx @@ -1,4 +1,5 @@ -import React, { useId } from 'react'; +import React, { useMemo } from 'react'; +import { nanoid } from 'nanoid'; import { useTranslationContext } from '../../context/TranslationContext'; import { useChatContext } from '../../context/ChatContext'; @@ -76,7 +77,7 @@ export const FileUploadIconFlat = () => { }; export const LoadingIndicatorIcon = ({ size = 20 }: { size?: number }) => { - const id = useId(); + const id = useMemo(() => nanoid(), []); return (