Skip to content

Commit

Permalink
Fix tsc error on fresh install
Browse files Browse the repository at this point in the history
Typescript treats the `remember: false` as a literal type in the useForm call, which makes `tsc` fail when the checkbox calls `setData` with a boolean.

This commit tells `tsc` to treat false as a boolean, which fixes the `tsc` error and makes `npm run build` pass
  • Loading branch information
MariosIgkiempor authored Jan 26, 2025
1 parent 3aa5d34 commit 45da5d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stubs/inertia-react-ts/resources/js/Pages/Auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Login({
const { data, setData, post, processing, errors, reset } = useForm({
email: '',
password: '',
remember: false,
remember: false as boolean,
});

const submit: FormEventHandler = (e) => {
Expand Down

0 comments on commit 45da5d4

Please sign in to comment.