mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 16:34:54 +00:00
bugfixes
This commit is contained in:
@ -8,7 +8,7 @@ const Entry = () => {
|
|||||||
const [tab, setTab] = useState<"register" | "login" | "reset-password">("login");
|
const [tab, setTab] = useState<"register" | "login" | "reset-password">("login");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View>
|
<View style={{height:"100%"}}>
|
||||||
{tab === "register" && <SignUpPage setTab={setTab}/>}
|
{tab === "register" && <SignUpPage setTab={setTab}/>}
|
||||||
{tab === "login" && <SignInPage setTab={setTab}/>}
|
{tab === "login" && <SignInPage setTab={setTab}/>}
|
||||||
{tab === "reset-password" && <ResetPasswordPage setTab={setTab}/>}
|
{tab === "reset-password" && <ResetPasswordPage setTab={setTab}/>}
|
||||||
|
|||||||
@ -167,7 +167,7 @@ const SignInPage = ({
|
|||||||
bottom
|
bottom
|
||||||
width="100%"
|
width="100%"
|
||||||
height="70%"
|
height="70%"
|
||||||
containerStyle={{ padding: 0 }}
|
containerStyle={{ padding: 15, backgroundColor:"white" }}
|
||||||
>
|
>
|
||||||
{hasPermission === null ? (
|
{hasPermission === null ? (
|
||||||
<Text>Requesting camera permissions...</Text>
|
<Text>Requesting camera permissions...</Text>
|
||||||
@ -175,7 +175,7 @@ const SignInPage = ({
|
|||||||
<Text>No access to camera</Text>
|
<Text>No access to camera</Text>
|
||||||
) : (
|
) : (
|
||||||
<CameraView
|
<CameraView
|
||||||
style={{ flex: 1 }}
|
style={{ flex: 1, borderRadius: 15 }}
|
||||||
onBarcodeScanned={handleQrCodeScanned}
|
onBarcodeScanned={handleQrCodeScanned}
|
||||||
barcodeScannerSettings={{
|
barcodeScannerSettings={{
|
||||||
barcodeTypes: ["qr"],
|
barcodeTypes: ["qr"],
|
||||||
@ -186,7 +186,7 @@ const SignInPage = ({
|
|||||||
label="Cancel"
|
label="Cancel"
|
||||||
onPress={() => setShowCameraDialog(false)}
|
onPress={() => setShowCameraDialog(false)}
|
||||||
backgroundColor="#fd1775"
|
backgroundColor="#fd1775"
|
||||||
style={{ margin: 10 }}
|
style={{ margin: 10, marginBottom: 30 }}
|
||||||
/>
|
/>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@ -10,8 +10,7 @@ import {
|
|||||||
View,
|
View,
|
||||||
} from "react-native-ui-lib";
|
} from "react-native-ui-lib";
|
||||||
import {useSignUp} from "@/hooks/firebase/useSignUp";
|
import {useSignUp} from "@/hooks/firebase/useSignUp";
|
||||||
import { ProfileType } from "@/contexts/AuthContext";
|
import {StyleSheet} from "react-native";
|
||||||
import { Dimensions, StyleSheet } from "react-native";
|
|
||||||
import {AntDesign} from "@expo/vector-icons";
|
import {AntDesign} from "@expo/vector-icons";
|
||||||
|
|
||||||
const SignUpPage = ({
|
const SignUpPage = ({
|
||||||
@ -40,7 +39,7 @@ const SignUpPage = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View padding-15 marginT-30 height={Dimensions.get("window").height} flexG>
|
<View height={"100%"} padding-15 marginT-30>
|
||||||
<Text style={styles.title}>Get started with Cally</Text>
|
<Text style={styles.title}>Get started with Cally</Text>
|
||||||
<Text style={styles.subtitle} marginT-15 color="#919191">
|
<Text style={styles.subtitle} marginT-15 color="#919191">
|
||||||
Please enter your details.
|
Please enter your details.
|
||||||
@ -144,6 +143,7 @@ const SignUpPage = ({
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
<View flex-1/>
|
||||||
<View style={styles.bottomView}>
|
<View style={styles.bottomView}>
|
||||||
<Button
|
<Button
|
||||||
label="Register"
|
label="Register"
|
||||||
@ -193,7 +193,7 @@ const styles = StyleSheet.create({
|
|||||||
color: "#919191",
|
color: "#919191",
|
||||||
},
|
},
|
||||||
//mora da se izmeni kako treba
|
//mora da se izmeni kako treba
|
||||||
bottomView: { marginTop: "auto", marginBottom: 30 },
|
bottomView: {marginTop: "auto", marginBottom: 30, marginTop: "auto"},
|
||||||
jakartaLight: {
|
jakartaLight: {
|
||||||
fontFamily: "PlusJakartaSans_300Light",
|
fontFamily: "PlusJakartaSans_300Light",
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
|
|||||||
@ -15,7 +15,7 @@ export const useCreateSubUser = () => {
|
|||||||
return await functions().httpsCallable("createSubUser")({
|
return await functions().httpsCallable("createSubUser")({
|
||||||
...userProfile,
|
...userProfile,
|
||||||
email,
|
email,
|
||||||
familyId: profileData?.familyId
|
familyId: profileData?.familyId!
|
||||||
}) as HttpsCallableResult<{ userId: string }>
|
}) as HttpsCallableResult<{ userId: string }>
|
||||||
} else {
|
} else {
|
||||||
throw Error("Can't create sub-users as a non-parent.")
|
throw Error("Can't create sub-users as a non-parent.")
|
||||||
|
|||||||
Reference in New Issue
Block a user