Minor changes

This commit is contained in:
Milan Paunovic
2024-11-01 04:45:43 +01:00
parent 37529c454e
commit cc2defe154
2 changed files with 18 additions and 4 deletions

View File

@ -619,7 +619,7 @@ export const ManuallyAddEventModal = () => {
<Button
disabled
marginH-30
marginB-15
marginB-30
label="Create event from image"
text70
style={{height: 47}}

View File

@ -1,6 +1,6 @@
import { Button, Text, View } from "react-native-ui-lib";
import React, { useState } from "react";
import { StyleSheet } from "react-native";
import {Linking, StyleSheet} from "react-native";
import { Octicons } from "@expo/vector-icons";
import CalendarSettingsPage from "./CalendarSettingsPage";
import ChoreRewardSettings from "./ChoreRewardSettings";
@ -21,11 +21,23 @@ const pageIndex = {
policy: 4,
};
const PRIVACY_POLICY_URL = 'https://callyapp.com';
const SettingsPage = () => {
const { profileData } = useAuthContext();
const [pageIndex, setPageIndex] = useAtom(settingsPageIndex);
const isntParent = profileData?.userType !== ProfileType.PARENT;
const openPrivacyPolicy = async () => {
const supported = await Linking.canOpenURL(PRIVACY_POLICY_URL);
if (supported) {
await Linking.openURL(PRIVACY_POLICY_URL);
} else {
console.log("Don't know how to open this URL:", PRIVACY_POLICY_URL);
}
};
return (
<View flexG>
{pageIndex == 0 && (
@ -73,7 +85,8 @@ const SettingsPage = () => {
}}
/>
<Button
disabled={isntParent}
disabled
// disabled={isntParent}
backgroundColor="white"
style={styles.mainBtn}
children={
@ -84,7 +97,7 @@ const SettingsPage = () => {
color="#ff9900"
style={{ marginRight: 10 }}
/>
<Text style={[styles.label, isntParent ? styles.disabledText : {color: "#ff9900"}]}>
<Text style={[styles.label, true ? styles.disabledText : {color: "#ff9900"}]}>
To-Do Reward Settings
</Text>
<ArrowRightIcon style={{ marginLeft: "auto" }} />
@ -95,6 +108,7 @@ const SettingsPage = () => {
<Button
backgroundColor="white"
style={styles.mainBtn}
onPress={openPrivacyPolicy}
children={
<View row centerV width={"100%"}>
<PrivacyPolicyIcon style={{ marginRight: 10 }} />