From fb182042c791b044b7be79ecc6b1eaf0bde58ae1 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Mon, 17 Oct 2022 17:34:52 +0200 Subject: [PATCH] Attach Bot Install Modal: Fix bot name flickering (#2071) --- src/components/main/AttachBotInstallModal.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/main/AttachBotInstallModal.tsx b/src/components/main/AttachBotInstallModal.tsx index 6fac7bcc6..75cf80115 100644 --- a/src/components/main/AttachBotInstallModal.tsx +++ b/src/components/main/AttachBotInstallModal.tsx @@ -5,6 +5,7 @@ import type { FC } from '../../lib/teact/teact'; import type { ApiUser } from '../../api/types'; import useLang from '../../hooks/useLang'; +import useCurrentOrPrev from '../../hooks/useCurrentOrPrev'; import ConfirmDialog from '../ui/ConfirmDialog'; @@ -19,7 +20,7 @@ const AttachBotInstallModal: FC = ({ const lang = useLang(); - const name = bot?.firstName; + const name = useCurrentOrPrev(bot?.firstName, true); return (