Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
saleem-hadad committed Apr 16, 2022
1 parent dd202ba commit e340361
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
13 changes: 0 additions & 13 deletions resources/js/Components/Global/Checkbox.js

This file was deleted.

14 changes: 2 additions & 12 deletions resources/js/Pages/Auth/Login.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useEffect } from 'react';
import Button from '@/Components/Global/Button';
import Checkbox from '@/Components/Global/Checkbox';
import Guest from '@/Layouts/Guest';
import Input from '@/Components/Global/Input';
import Label from '@/Components/Global/Label';
Expand All @@ -10,8 +9,7 @@ import { Head, useForm } from '@inertiajs/inertia-react';
export default function Login({ status }) {
const { data, setData, post, processing, errors, reset } = useForm({
email: '',
password: '',
remember: '',
password: ''
});

useEffect(() => {
Expand All @@ -21,7 +19,7 @@ export default function Login({ status }) {
}, []);

const onHandleChange = (event) => {
setData(event.target.name, event.target.type === 'checkbox' ? event.target.checked : event.target.value);
setData(event.target.name, event.target.value);
};

const submit = (e) => {
Expand Down Expand Up @@ -66,14 +64,6 @@ export default function Login({ status }) {
/>
</div>

<div className="block mt-4">
<label className="flex items-center">
<Checkbox name="remember" value={data.remember} handleChange={onHandleChange} />

<span className="ml-2 text-sm text-gray-600">Remember me</span>
</label>
</div>

<div className="flex items-center justify-end mt-4">
<Button className="ml-4" processing={processing}>
Log in
Expand Down

0 comments on commit e340361

Please sign in to comment.