diff --git a/components/pages/grocery/GroceryList.tsx b/components/pages/grocery/GroceryList.tsx
index be9f166..0fe5186 100644
--- a/components/pages/grocery/GroceryList.tsx
+++ b/components/pages/grocery/GroceryList.tsx
@@ -74,7 +74,7 @@ const GroceryList = ({onInputFocus}: {onInputFocus: (y: number) => void}) => {
}, [groceries]);
return (
-
+
{
@@ -234,34 +235,6 @@ const CalendarSettingsPage = () => {
color="black"
text70BL
/>
- {profileData?.googleAccounts
- ? Object.keys(profileData?.googleAccounts)?.map((googleMail) => {
- const googleToken = profileData?.googleAccounts?.[googleMail]?.accessToken;
- return (
- googleToken && (
-
)
);
}
@@ -427,46 +354,57 @@ const CalendarSettingsPage = () => {
const appleToken = profileData?.appleAccounts?.[appleEmail];
return (
appleToken && (
-
- fetchAndSaveAppleEvents({
- email: appleEmail,
- token: appleToken,
- })
- }
- >
-
-
- fetchAndSaveAppleEvents({
- email: appleEmail,
- token: appleToken,
- })
- }
- label={isSyncingApple ? "Syncing Events from the Apple calendar..." : `Sync Apple`}
- labelStyle={styles.addCalLbl}
- labelProps={{numberOfLines: 3}}
- iconSource={() => (
-
-
-
- )}
- style={styles.addCalBtn}
- color="black"
- text70BL
- />
+
+
+
+
+
+
+ {appleEmail}
+
{isSyncingApple ? (
-
+
+
+
) : (
-
+
+
+ fetchAndSaveAppleEvents({
+ email: appleEmail,
+ token: appleToken,
+ })
+ }
+ iconSource={() => }
+ />
+
)}
+ showConfirmationDialog("apple", appleEmail)}
+ iconSource={() => }
+ />
-
+
)
);
})}
@@ -478,46 +416,59 @@ const CalendarSettingsPage = () => {
profileData?.microsoftAccounts?.[microsoftEmail];
return (
microsoftToken && (
-
- fetchAndSaveOutlookEvents({
- token: microsoftToken,
- email: microsoftEmail,
- })
- }
- >
-
-
- fetchAndSaveOutlookEvents({
- token: microsoftToken,
- email: microsoftEmail,
- })
- }
- label={`Sync ${microsoftEmail}`}
- labelStyle={styles.addCalLbl}
- labelProps={{numberOfLines: 3}}
- iconSource={() => (
-
-
-
- )}
- style={styles.addCalBtn}
- color="black"
- text70BL
- />
+
+
{isSyncingOutlook ? (
-
+
+
+
) : (
-
+
+
+ fetchAndSaveOutlookEvents({
+ token: microsoftToken,
+ email: microsoftEmail,
+ })
+ }
+ iconSource={() => }
+ />
+
)}
+
+
+
+
+ {microsoftEmail}
+
+ showConfirmationDialog("outlook", microsoftEmail)
+ }
+ iconSource={() => }
+ />
-
+
)
);
}
@@ -578,10 +529,10 @@ const styles = StyleSheet.create({
fontSize: 16,
fontFamily: "PlusJakartaSan_500Medium",
flexWrap: "wrap",
- width: "75%",
+ width: "70%",
textAlign: "left",
lineHeight: 20,
- overflow: "visible",
+ overflow: "hidden",
},
subTitle: {
fontFamily: "Manrope_600SemiBold",
diff --git a/components/pages/settings/user_components/DeleteProfileDialogs.tsx b/components/pages/settings/user_components/DeleteProfileDialogs.tsx
new file mode 100644
index 0000000..64b8efa
--- /dev/null
+++ b/components/pages/settings/user_components/DeleteProfileDialogs.tsx
@@ -0,0 +1,128 @@
+import React, { useState } from "react";
+import { Dialog, Button, Text, View } from "react-native-ui-lib";
+import { StyleSheet } from "react-native";
+import { Feather } from "@expo/vector-icons";
+
+interface ConfirmationDialogProps {
+ visible: boolean;
+ onDismiss: () => void;
+ onFirstYes: () => void;
+ onConfirm: () => void;
+}
+
+const DeleteProfileDialogs: React.FC = ({
+ visible,
+ onDismiss,
+ onFirstYes,
+ onConfirm,
+}) => {
+ const [confirmationDialog, setConfirmationDialog] = useState(false);
+ return (
+ <>
+
+
+ >
+ );
+};
+
+// Empty stylesheet for future styles
+const styles = StyleSheet.create({
+ confirmBtn: {
+ backgroundColor: "#FF5449",
+ },
+ cancelBtn: {
+ backgroundColor: "white",
+ },
+ dialog: {
+ backgroundColor: "white",
+ paddingHorizontal: 25,
+ paddingTop: 25,
+ paddingBottom: 17,
+ borderRadius: 20,
+ },
+ title: {
+ fontFamily: "Manrope_600SemiBold",
+ fontSize: 22,
+ marginBottom: 5,
+ },
+ text: {
+ fontFamily: "PlusJakartaSans_400Regular",
+ fontSize: 16,
+ marginBottom: 0,
+ },
+});
+
+export default DeleteProfileDialogs;
diff --git a/components/pages/settings/user_settings_views/MyProfile.tsx b/components/pages/settings/user_settings_views/MyProfile.tsx
index a12bf5f..8f9daaf 100644
--- a/components/pages/settings/user_settings_views/MyProfile.tsx
+++ b/components/pages/settings/user_settings_views/MyProfile.tsx
@@ -3,6 +3,7 @@ import { StyleSheet, TouchableOpacity } from "react-native";
import { ScrollView } from "react-native-gesture-handler";
import * as ImagePicker from "expo-image-picker";
import {
+ Button,
Colors,
Image,
Picker,
@@ -18,6 +19,7 @@ import { useAuthContext } from "@/contexts/AuthContext";
import { useUpdateUserData } from "@/hooks/firebase/useUpdateUserData";
import { useChangeProfilePicture } from "@/hooks/firebase/useChangeProfilePicture";
import { colorMap } from "@/constants/colorMap";
+import DeleteProfileDialogs from "../user_components/DeleteProfileDialogs";
const MyProfile = () => {
const { user, profileData } = useAuthContext();
@@ -32,6 +34,15 @@ const MyProfile = () => {
string | ImagePicker.ImagePickerAsset | null
>(profileData?.pfp || null);
+ const [showDeleteDialog, setShowDeleteDialog] = useState(false);
+
+ const handleHideDeleteDialog = () => {
+ setShowDeleteDialog(false);
+ };
+ const handleShowDeleteDialog = () => {
+ setShowDeleteDialog(true);
+ };
+
const { mutateAsync: updateUserData } = useUpdateUserData();
const { mutateAsync: changeProfilePicture } = useChangeProfilePicture();
const isFirstRender = useRef(true);
@@ -93,7 +104,7 @@ const MyProfile = () => {
: profileImage;
return (
-
+
Your Profile
@@ -205,6 +216,22 @@ const MyProfile = () => {
+
+ {
+ setShowDeleteDialog(false);
+ }}
+ visible={showDeleteDialog}
+ onDismiss={handleHideDeleteDialog}
+ onConfirm={() => {console.log('delete account here')}}
+ />
);
};