Skip to content

Use Controller to properly subscribe to input value changes instead of getValues(). #6

@Polqt

Description

@Polqt

Lines 39-40 manually register fields but lines 107 and 115 bind TextField.value to getValues(), which only returns a snapshot. In react-hook-form, this does not subscribe the component to value changes, so the inputs stop reflecting keystrokes after the first validation update. The signup form in this PR already uses Controller for the same inputs; apply the same pattern here.

Additionally, line 49 duplicates the routing logic from AuthProvider.tsx:151–153, which already redirects officials to /(official)/dashboard based on profile role. Remove the explicit router.replace() call to let the provider handle routing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions