Skip to content

Commit 43bddcc

Browse files
committed
Fix duplicated form refs
1 parent 5d924ba commit 43bddcc

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/pages/settings/Agents/AddAgentPage.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ function AddAgentPageContent({route, template}: AddAgentPageContentProps) {
161161
Navigation.navigate(ROUTES.AGENT_REPORT.getRoute(optimisticReportID), {forceReplace: true});
162162
};
163163

164-
const formWrapperRef = useRef<FormRef>(null);
165-
const handleInputFocus = () => scrollToMultilineInput(formWrapperRef, isInLandscapeMode);
164+
const handleInputFocus = () => scrollToMultilineInput(formRef, isInLandscapeMode);
166165

167166
const agentAvatar = avatarSource ? (
168167
<UserAvatar
@@ -195,7 +194,6 @@ function AddAgentPageContent({route, template}: AddAgentPageContentProps) {
195194
submitFlexEnabled={false}
196195
shouldHideFixErrorsAlert
197196
enabledWhenOffline
198-
ref={formWrapperRef}
199197
// Block submit until the draft has loaded, so we never create the agent without the preset/photo it will restore.
200198
isSubmitDisabled={isDraftLoading}
201199
>

0 commit comments

Comments
 (0)