Attach Bot Install Modal: Fix bot name flickering (#2071)

This commit is contained in:
Alexander Zinchuk 2022-10-17 17:34:52 +02:00
parent 3f1da18e39
commit fb182042c7

View File

@ -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<OwnProps> = ({
const lang = useLang();
const name = bot?.firstName;
const name = useCurrentOrPrev(bot?.firstName, true);
return (
<ConfirmDialog