mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 16:34:54 +00:00
Minor changes
This commit is contained in:
@ -619,7 +619,7 @@ export const ManuallyAddEventModal = () => {
|
|||||||
<Button
|
<Button
|
||||||
disabled
|
disabled
|
||||||
marginH-30
|
marginH-30
|
||||||
marginB-15
|
marginB-30
|
||||||
label="Create event from image"
|
label="Create event from image"
|
||||||
text70
|
text70
|
||||||
style={{height: 47}}
|
style={{height: 47}}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Button, Text, View } from "react-native-ui-lib";
|
import { Button, Text, View } from "react-native-ui-lib";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { StyleSheet } from "react-native";
|
import {Linking, StyleSheet} from "react-native";
|
||||||
import { Octicons } from "@expo/vector-icons";
|
import { Octicons } from "@expo/vector-icons";
|
||||||
import CalendarSettingsPage from "./CalendarSettingsPage";
|
import CalendarSettingsPage from "./CalendarSettingsPage";
|
||||||
import ChoreRewardSettings from "./ChoreRewardSettings";
|
import ChoreRewardSettings from "./ChoreRewardSettings";
|
||||||
@ -21,11 +21,23 @@ const pageIndex = {
|
|||||||
policy: 4,
|
policy: 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const PRIVACY_POLICY_URL = 'https://callyapp.com';
|
||||||
|
|
||||||
|
|
||||||
const SettingsPage = () => {
|
const SettingsPage = () => {
|
||||||
const { profileData } = useAuthContext();
|
const { profileData } = useAuthContext();
|
||||||
const [pageIndex, setPageIndex] = useAtom(settingsPageIndex);
|
const [pageIndex, setPageIndex] = useAtom(settingsPageIndex);
|
||||||
const isntParent = profileData?.userType !== ProfileType.PARENT;
|
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 (
|
return (
|
||||||
<View flexG>
|
<View flexG>
|
||||||
{pageIndex == 0 && (
|
{pageIndex == 0 && (
|
||||||
@ -73,7 +85,8 @@ const SettingsPage = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
disabled={isntParent}
|
disabled
|
||||||
|
// disabled={isntParent}
|
||||||
backgroundColor="white"
|
backgroundColor="white"
|
||||||
style={styles.mainBtn}
|
style={styles.mainBtn}
|
||||||
children={
|
children={
|
||||||
@ -84,7 +97,7 @@ const SettingsPage = () => {
|
|||||||
color="#ff9900"
|
color="#ff9900"
|
||||||
style={{ marginRight: 10 }}
|
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
|
To-Do Reward Settings
|
||||||
</Text>
|
</Text>
|
||||||
<ArrowRightIcon style={{ marginLeft: "auto" }} />
|
<ArrowRightIcon style={{ marginLeft: "auto" }} />
|
||||||
@ -95,6 +108,7 @@ const SettingsPage = () => {
|
|||||||
<Button
|
<Button
|
||||||
backgroundColor="white"
|
backgroundColor="white"
|
||||||
style={styles.mainBtn}
|
style={styles.mainBtn}
|
||||||
|
onPress={openPrivacyPolicy}
|
||||||
children={
|
children={
|
||||||
<View row centerV width={"100%"}>
|
<View row centerV width={"100%"}>
|
||||||
<PrivacyPolicyIcon style={{ marginRight: 10 }} />
|
<PrivacyPolicyIcon style={{ marginRight: 10 }} />
|
||||||
|
|||||||
Reference in New Issue
Block a user