Skip to content

Commit

Permalink
Add default value for useRef calls in TS (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasweiss authored Jan 15, 2024
1 parent 7b7beca commit e853918
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useForm } from '@inertiajs/react';

export default function DeleteUserForm({ className = '' }: { className?: string }) {
const [confirmingUserDeletion, setConfirmingUserDeletion] = useState(false);
const passwordInput = useRef<HTMLInputElement>();
const passwordInput = useRef<HTMLInputElement>(null);

const {
data,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { useForm } from '@inertiajs/react';
import { Transition } from '@headlessui/react';

export default function UpdatePasswordForm({ className = '' }: { className?: string }) {
const passwordInput = useRef<HTMLInputElement>();
const currentPasswordInput = useRef<HTMLInputElement>();
const passwordInput = useRef<HTMLInputElement>(null);
const currentPasswordInput = useRef<HTMLInputElement>(null);

const { data, setData, errors, put, reset, processing, recentlySuccessful } = useForm({
current_password: '',
Expand Down

0 comments on commit e853918

Please sign in to comment.