mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 16:34:54 +00:00
additional hooks
This commit is contained in:
30
components/pages/main/Entry.tsx
Normal file
30
components/pages/main/Entry.tsx
Normal file
@ -0,0 +1,30 @@
|
||||
import { View, Text } from "react-native-ui-lib";
|
||||
import React, { useState } from "react";
|
||||
import SignUpPage from "./SignUpPage";
|
||||
import SignInPage from "./SignInPage";
|
||||
import { useSignUp } from "@/hooks/firebase/useSignUp";
|
||||
|
||||
const Entry = () => {
|
||||
const [isRegister, setIsRegister] = useState<boolean>(false);
|
||||
const {mutateAsync: signUp} = useSignUp();
|
||||
|
||||
const setRegister = () => {
|
||||
setIsRegister(true);
|
||||
};
|
||||
const unsetRegister = () => {
|
||||
setIsRegister(false);
|
||||
};
|
||||
return (
|
||||
<View>
|
||||
{isRegister ? (
|
||||
<SignUpPage
|
||||
unsetRegister={unsetRegister}
|
||||
/>
|
||||
) : (
|
||||
<SignInPage setRegister={setRegister} />
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default Entry;
|
||||
Reference in New Issue
Block a user