Skip to content

Commit f867864

Browse files
integrating checkbox
1 parent bff942c commit f867864

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/pages/Login.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import React, { useEffect, useState } from "react";
32
import {
43
IonButtons,
@@ -12,18 +11,22 @@ import {
1211
IonLabel,
1312
IonInput,
1413
IonAlert,
14+
IonCheckbox,
1515
} from "@ionic/react";
1616

1717
import { useForm, Controller } from "react-hook-form";
1818
import { ErrorMessage } from "@hookform/error-message";
1919

20-
2120
import { useAuth } from "reactfire";
2221

22+
export interface CheckboxChangeEventDetail {
23+
value: any;
24+
checked: boolean;
25+
}
26+
2327
const Login: React.FunctionComponent = () => {
2428
const [showErrorAlert, setShowErrorAlert] = useState("");
2529

26-
2730
// SEE - https://github.com/FirebaseExtended/reactfire/issues/228
2831
useEffect(() => {
2932
let map = (globalThis as any)["_reactFirePreloadedObservables"];
@@ -41,6 +44,7 @@ const Login: React.FunctionComponent = () => {
4144
* get data from form and sign the user in
4245
*/
4346
const signIn = async (data: any) => {
47+
console.log(data);
4448
try {
4549
let r = await auth.signInWithEmailAndPassword(data.email, data.password);
4650
console.log(r);
@@ -68,6 +72,8 @@ const Login: React.FunctionComponent = () => {
6872
);
6973
};
7074

75+
console.log(errors);
76+
7177
return (
7278
<IonPage>
7379
<IonHeader>

0 commit comments

Comments
 (0)