Minor fixes

This commit is contained in:
Milan Paunovic
2024-10-31 23:41:54 +01:00
parent 641d65a736
commit 539cbd9f10
12 changed files with 283 additions and 54 deletions

View File

@ -95,6 +95,8 @@ export const EventCalendar: React.FC<EventCalendarProps> = React.memo(
[profileData]
);
console.log({memoizedWeekStartsOn, profileData: profileData?.firstDayOfWeek})
const isSameDate = useCallback((date1: Date, date2: Date) => {
return (
date1.getDate() === date2.getDate() &&

View File

@ -343,7 +343,6 @@ export const ManuallyAddEventModal = () => {
<TextField
placeholder="Add event title"
value={title}
autoFocus
onChangeText={(text) => {
setTitle(text);
}}
@ -555,14 +554,15 @@ export const ManuallyAddEventModal = () => {
</View>
<View style={styles.divider}/>
<View marginH-30 marginB-0 row spread centerV>
<View row centerH>
<View row center>
<LockIcon/>
<Text
style={{
fontFamily: "PlusJakartaSans_500Medium",
fontSize: 16,
}}
marginL-10
marginL-12
center
>
Mark as Private
</Text>

View File

@ -1,8 +1,9 @@
import {
Button,
ButtonSize, Colors,
ButtonSize,
Colors,
Dialog,
KeyboardAwareScrollView, LoaderScreen, Modal,
LoaderScreen,
Text,
TextField,
TextFieldRef,
@ -14,6 +15,9 @@ import {KeyboardAvoidingView, Platform, StyleSheet} from "react-native";
import Toast from "react-native-toast-message";
import {useLoginWithQrCode} from "@/hooks/firebase/useLoginWithQrCode";
import {Camera, CameraView} from "expo-camera";
import KeyboardManager from "react-native-keyboard-manager";
KeyboardManager.setEnableAutoToolbar(true);
const SignInPage = ({
setTab,

View File

@ -12,6 +12,9 @@ import {
import {useSignUp} from "@/hooks/firebase/useSignUp";
import {StyleSheet} from "react-native";
import {AntDesign} from "@expo/vector-icons";
import KeyboardManager from "react-native-keyboard-manager";
KeyboardManager.setEnableAutoToolbar(true);
const SignUpPage = ({
setTab,

View File

@ -322,9 +322,7 @@ const CalendarSettingsPage = () => {
const handleChangeFirstDayOfWeek = (firstDayOfWeek: string) => {
setFirstDayOfWeek(firstDayOfWeek);
debouncedUpdateFirstDayOfWeek(
firstDayOfWeek === "Sundays" ? "Mondays" : "Sundays"
);
debouncedUpdateFirstDayOfWeek(firstDayOfWeek);
};
const handleChangeColor = (color: string) => {
@ -610,7 +608,7 @@ const CalendarSettingsPage = () => {
Connected Calendars
</Text>
<View style={styles.noPaddingCard}>
<View style={[styles.noPaddingCard, {marginBottom: 100}]}>
<View style={{marginTop: 20}}>
{profileData?.googleAccounts &&
Object.keys(profileData?.googleAccounts)?.map(

View File

@ -48,7 +48,7 @@ const MyProfile = () => {
return;
}
debouncedUserDataUpdate();
}, [timeZone, lastName, firstName, profileImage]);
}, [timeZone, lastName, firstName]);
useEffect(() => {
if (profileData) {
@ -78,7 +78,7 @@ const MyProfile = () => {
if (!result.canceled) {
setProfileImage(result.assets[0].uri);
changeProfilePicture(result.assets[0]);
await changeProfilePicture(result.assets[0]);
}
};

View File

@ -9,6 +9,7 @@ import { useGetChildrenByParentId } from "@/hooks/firebase/useGetChildrenByParen
import { useGetFamilyMembers } from "@/hooks/firebase/useGetFamilyMembers";
import { UserProfile } from "@/hooks/firebase/types/profileTypes";
import { child } from "@react-native-firebase/storage";
import CachedImage from 'expo-cached-image'
const HeaderTemplate = (props: {
message: string;
@ -80,7 +81,7 @@ const HeaderTemplate = (props: {
<View row centerV marginV-15 style={styles.bottomMarg}>
{profileData?.pfp ? (
<View>
<Image source={{ uri: profileData.pfp }} style={styles.pfp} />
<CachedImage source={{ uri: profileData.pfp, }} style={styles.pfp} cacheKey={profileData.pfp}/>
{isFamilyView && props.isCalendar && (
<View style={styles.childrenPfpArr} row>
{children?.slice(0, 3).map((child, index) => {

View File

@ -59,7 +59,7 @@ async function registerForPushNotificationsAsync() {
}
if (finalStatus !== 'granted') {
alert('Failed to get push token for push notification!');
// alert('Failed to get push token for push notification!');
return;
}
@ -76,11 +76,11 @@ async function registerForPushNotificationsAsync() {
console.log('Push Token:', token);
return token;
} catch (error) {
alert(`Error getting push token: ${error}`);
// alert(`Error getting push token: ${error}`);
throw error;
}
} else {
alert('Must use a physical device for push notifications');
// alert('Must use a physical device for push notifications');
}
}

View File

@ -44,7 +44,7 @@ export const useChangeProfilePicture = () => {
.update({ pfp: downloadURL });
} catch (e) {
console.error("Error uploading profile picture:", e.message);
console.error("Error uploading profile picture:", e);
throw e;
}
},

View File

@ -450,7 +450,7 @@
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.cally.app;
PRODUCT_NAME = "Cally";
PRODUCT_NAME = Cally;
SWIFT_OBJC_BRIDGING_HEADER = "cally/cally-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
@ -484,7 +484,7 @@
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.cally.app;
PRODUCT_NAME = "Cally";
PRODUCT_NAME = Cally;
SWIFT_OBJC_BRIDGING_HEADER = "cally/cally-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";

View File

@ -50,6 +50,7 @@
"expo-auth-session": "^5.5.2",
"expo-barcode-scanner": "~13.0.1",
"expo-build-properties": "~0.12.4",
"expo-cached-image": "^51.0.19",
"expo-calendar": "~13.0.5",
"expo-camera": "~15.0.16",
"expo-constants": "~16.0.2",

220
yarn.lock
View File

@ -953,6 +953,89 @@
wrap-ansi "^7.0.0"
ws "^8.12.1"
"@expo/cli@0.18.30":
version "0.18.30"
resolved "https://registry.yarnpkg.com/@expo/cli/-/cli-0.18.30.tgz#0cb4829aa11e98ae350a5c15958b9816e9a1d2f0"
integrity sha512-V90TUJh9Ly8stYo8nwqIqNWCsYjE28GlVFWEhAFCUOp99foiQr8HSTpiiX5GIrprcPoWmlGoY+J5fQA29R4lFg==
dependencies:
"@babel/runtime" "^7.20.0"
"@expo/code-signing-certificates" "0.0.5"
"@expo/config" "~9.0.0-beta.0"
"@expo/config-plugins" "~8.0.8"
"@expo/devcert" "^1.0.0"
"@expo/env" "~0.3.0"
"@expo/image-utils" "^0.5.0"
"@expo/json-file" "^8.3.0"
"@expo/metro-config" "0.18.11"
"@expo/osascript" "^2.0.31"
"@expo/package-manager" "^1.5.0"
"@expo/plist" "^0.1.0"
"@expo/prebuild-config" "7.0.9"
"@expo/rudder-sdk-node" "1.1.1"
"@expo/spawn-async" "^1.7.2"
"@expo/xcpretty" "^4.3.0"
"@react-native/dev-middleware" "0.74.85"
"@urql/core" "2.3.6"
"@urql/exchange-retry" "0.3.0"
accepts "^1.3.8"
arg "5.0.2"
better-opn "~3.0.2"
bplist-creator "0.0.7"
bplist-parser "^0.3.1"
cacache "^18.0.2"
chalk "^4.0.0"
ci-info "^3.3.0"
connect "^3.7.0"
debug "^4.3.4"
env-editor "^0.4.1"
fast-glob "^3.3.2"
find-yarn-workspace-root "~2.0.0"
form-data "^3.0.1"
freeport-async "2.0.0"
fs-extra "~8.1.0"
getenv "^1.0.0"
glob "^7.1.7"
graphql "15.8.0"
graphql-tag "^2.10.1"
https-proxy-agent "^5.0.1"
internal-ip "4.3.0"
is-docker "^2.0.0"
is-wsl "^2.1.1"
js-yaml "^3.13.1"
json-schema-deref-sync "^0.13.0"
lodash.debounce "^4.0.8"
md5hex "^1.0.0"
minimatch "^3.0.4"
node-fetch "^2.6.7"
node-forge "^1.3.1"
npm-package-arg "^7.0.0"
open "^8.3.0"
ora "3.4.0"
picomatch "^3.0.1"
pretty-bytes "5.6.0"
progress "2.0.3"
prompts "^2.3.2"
qrcode-terminal "0.11.0"
require-from-string "^2.0.2"
requireg "^0.2.2"
resolve "^1.22.2"
resolve-from "^5.0.0"
resolve.exports "^2.0.2"
semver "^7.6.0"
send "^0.18.0"
slugify "^1.3.4"
source-map-support "~0.5.21"
stacktrace-parser "^0.1.10"
structured-headers "^0.4.1"
tar "^6.0.5"
temp-dir "^2.0.0"
tempy "^0.7.1"
terminal-link "^2.1.1"
text-table "^0.2.0"
url-join "4.0.0"
wrap-ansi "^7.0.0"
ws "^8.12.1"
"@expo/code-signing-certificates@0.0.5":
version "0.0.5"
resolved "https://registry.npmjs.org/@expo/code-signing-certificates/-/code-signing-certificates-0.0.5.tgz"
@ -961,6 +1044,27 @@
node-forge "^1.2.1"
nullthrows "^1.1.1"
"@expo/config-plugins@8.0.10":
version "8.0.10"
resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-8.0.10.tgz#5cda076f38bc04675cb42d8acdd23d6e460a62de"
integrity sha512-KG1fnSKRmsudPU9BWkl59PyE0byrE2HTnqbOrgwr2FAhqh7tfr9nRs6A9oLS/ntpGzmFxccTEcsV0L4apsuxxg==
dependencies:
"@expo/config-types" "^51.0.3"
"@expo/json-file" "~8.3.0"
"@expo/plist" "^0.1.0"
"@expo/sdk-runtime-versions" "^1.0.0"
chalk "^4.1.2"
debug "^4.3.1"
find-up "~5.0.0"
getenv "^1.0.0"
glob "7.1.6"
resolve-from "^5.0.0"
semver "^7.5.4"
slash "^3.0.0"
slugify "^1.6.6"
xcode "^3.0.1"
xml2js "0.6.0"
"@expo/config-plugins@8.0.9", "@expo/config-plugins@~8.0.0-beta.0", "@expo/config-plugins@~8.0.8":
version "8.0.9"
resolved "https://registry.npmjs.org/@expo/config-plugins/-/config-plugins-8.0.9.tgz"
@ -1013,6 +1117,11 @@
resolved "https://registry.npmjs.org/@expo/config-types/-/config-types-51.0.2.tgz"
integrity sha512-IglkIoiDwJMY01lYkF/ZSBoe/5cR+O3+Gx6fpLFjLfgZGBTdyPkKa1g8NWoWQCk+D3cKL2MDbszT2DyRRB0YqQ==
"@expo/config-types@^51.0.3":
version "51.0.3"
resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-51.0.3.tgz#520bdce5fd75f9d234fd81bd0347443086419450"
integrity sha512-hMfuq++b8VySb+m9uNNrlpbvGxYc8OcFCUX9yTmi9tlx6A4k8SDabWFBgmnr4ao3wEArvWrtUQIfQCVtPRdpKA==
"@expo/config@9.0.3", "@expo/config@~9.0.0", "@expo/config@~9.0.0-beta.0":
version "9.0.3"
resolved "https://registry.npmjs.org/@expo/config/-/config-9.0.3.tgz"
@ -1030,6 +1139,23 @@
slugify "^1.3.4"
sucrase "3.34.0"
"@expo/config@9.0.4":
version "9.0.4"
resolved "https://registry.yarnpkg.com/@expo/config/-/config-9.0.4.tgz#52f0a94edd0e2c36dfb5e284cc1a6d99d9d2af97"
integrity sha512-g5ns5u1JSKudHYhjo1zaSfkJ/iZIcWmUmIQptMJZ6ag1C0ShL2sj8qdfU8MmAMuKLOgcIfSaiWlQnm4X3VJVkg==
dependencies:
"@babel/code-frame" "~7.10.4"
"@expo/config-plugins" "~8.0.8"
"@expo/config-types" "^51.0.3"
"@expo/json-file" "^8.3.0"
getenv "^1.0.0"
glob "7.1.6"
require-from-string "^2.0.2"
resolve-from "^5.0.0"
semver "^7.6.0"
slugify "^1.3.4"
sucrase "3.34.0"
"@expo/config@~7.0.2":
version "7.0.3"
resolved "https://registry.npmjs.org/@expo/config/-/config-7.0.3.tgz"
@ -1278,6 +1404,23 @@
semver "^7.6.0"
xml2js "0.6.0"
"@expo/prebuild-config@7.0.9":
version "7.0.9"
resolved "https://registry.yarnpkg.com/@expo/prebuild-config/-/prebuild-config-7.0.9.tgz#7abd489e18ed6514a0c9cd214eb34c0d5efda799"
integrity sha512-9i6Cg7jInpnGEHN0jxnW0P+0BexnePiBzmbUvzSbRXpdXihYUX2AKMu73jgzxn5P1hXOSkzNS7umaY+BZ+aBag==
dependencies:
"@expo/config" "~9.0.0-beta.0"
"@expo/config-plugins" "~8.0.8"
"@expo/config-types" "^51.0.3"
"@expo/image-utils" "^0.5.0"
"@expo/json-file" "^8.3.0"
"@react-native/normalize-colors" "0.74.85"
debug "^4.3.1"
fs-extra "^9.0.0"
resolve-from "^5.0.0"
semver "^7.6.0"
xml2js "0.6.0"
"@expo/rudder-sdk-node@1.1.1":
version "1.1.1"
resolved "https://registry.npmjs.org/@expo/rudder-sdk-node/-/rudder-sdk-node-1.1.1.tgz"
@ -3568,6 +3711,19 @@ babel-plugin-polyfill-regenerator@^0.6.1:
dependencies:
"@babel/helper-define-polyfill-provider" "^0.6.2"
babel-plugin-react-compiler@0.0.0-experimental-592953e-20240517:
version "0.0.0-experimental-592953e-20240517"
resolved "https://registry.yarnpkg.com/babel-plugin-react-compiler/-/babel-plugin-react-compiler-0.0.0-experimental-592953e-20240517.tgz#e800fa1550d03573cd5637218dc711f12f642249"
integrity sha512-OjG1SVaeQZaJrqkMFJatg8W/MTow8Ak5rx2SI0ETQBO1XvOk/XZGMbltNCPdFJLKghBYoBjC+Y3Ap/Xr7B01mA==
dependencies:
"@babel/generator" "7.2.0"
"@babel/types" "^7.19.0"
chalk "4"
invariant "^2.2.4"
pretty-format "^24"
zod "^3.22.4"
zod-validation-error "^2.1.0"
babel-plugin-react-compiler@^0.0.0-experimental-592953e-20240517:
version "0.0.0-experimental-7d62301-20240821"
resolved "https://registry.npmjs.org/babel-plugin-react-compiler/-/babel-plugin-react-compiler-0.0.0-experimental-7d62301-20240821.tgz"
@ -3635,6 +3791,22 @@ babel-preset-expo@~11.0.14:
babel-plugin-react-native-web "~0.19.10"
react-refresh "^0.14.2"
babel-preset-expo@~11.0.15:
version "11.0.15"
resolved "https://registry.yarnpkg.com/babel-preset-expo/-/babel-preset-expo-11.0.15.tgz#f29b1ac1f59f8739f63c80515906186586c24d3c"
integrity sha512-rgiMTYwqIPULaO7iZdqyL7aAff9QLOX6OWUtLZBlOrOTreGY1yHah/5+l8MvI6NVc/8Zj5LY4Y5uMSnJIuzTLw==
dependencies:
"@babel/plugin-proposal-decorators" "^7.12.9"
"@babel/plugin-transform-export-namespace-from" "^7.22.11"
"@babel/plugin-transform-object-rest-spread" "^7.12.13"
"@babel/plugin-transform-parameters" "^7.22.15"
"@babel/preset-react" "^7.22.15"
"@babel/preset-typescript" "^7.23.0"
"@react-native/babel-preset" "0.74.87"
babel-plugin-react-compiler "0.0.0-experimental-592953e-20240517"
babel-plugin-react-native-web "~0.19.10"
react-refresh "^0.14.2"
babel-preset-jest@^29.6.3:
version "29.6.3"
resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz"
@ -5057,6 +5229,13 @@ expo-build-properties@~0.12.4:
ajv "^8.11.0"
semver "^7.6.0"
expo-cached-image@^51.0.19:
version "51.0.19"
resolved "https://registry.yarnpkg.com/expo-cached-image/-/expo-cached-image-51.0.19.tgz#27447d761a4b7414a2e5fee2e25c9436dd6f073e"
integrity sha512-HcIKolCKyrYcfimWp64S25Tv8YneUsKV47yJ93L4l4NVA7GJulqSS/fr2jf6B3mzw5rZNDU+eDAf1nzcxavfkg==
dependencies:
expo "51"
expo-calendar@~13.0.5:
version "13.0.5"
resolved "https://registry.npmjs.org/expo-calendar/-/expo-calendar-13.0.5.tgz"
@ -5201,6 +5380,19 @@ expo-modules-autolinking@1.11.2:
require-from-string "^2.0.2"
resolve-from "^5.0.0"
expo-modules-autolinking@1.11.3:
version "1.11.3"
resolved "https://registry.yarnpkg.com/expo-modules-autolinking/-/expo-modules-autolinking-1.11.3.tgz#bc64d278c04015014bb5802e3cfcd942d7c07168"
integrity sha512-oYh8EZEvYF5TYppxEKUTTJmbr8j7eRRnrIxzZtMvxLTXoujThVPMFS/cbnSnf2bFm1lq50TdDNABhmEi7z0ngQ==
dependencies:
chalk "^4.1.0"
commander "^7.2.0"
fast-glob "^3.2.5"
find-up "^5.0.0"
fs-extra "^9.1.0"
require-from-string "^2.0.2"
resolve-from "^5.0.0"
expo-modules-core@1.12.24:
version "1.12.24"
resolved "https://registry.npmjs.org/expo-modules-core/-/expo-modules-core-1.12.24.tgz"
@ -5208,6 +5400,13 @@ expo-modules-core@1.12.24:
dependencies:
invariant "^2.2.4"
expo-modules-core@1.12.26:
version "1.12.26"
resolved "https://registry.yarnpkg.com/expo-modules-core/-/expo-modules-core-1.12.26.tgz#86c4087dc6246abfc4d7f5e61097dc8cc4b22262"
integrity sha512-y8yDWjOi+rQRdO+HY+LnUlz8qzHerUaw/LUjKPU/mX8PRXP4UUPEEp5fjAwBU44xjNmYSHWZDwet4IBBE+yQUA==
dependencies:
invariant "^2.2.4"
expo-notifications@~0.28.18:
version "0.28.18"
resolved "https://registry.npmjs.org/expo-notifications/-/expo-notifications-0.28.18.tgz"
@ -5301,6 +5500,27 @@ expo-web-browser@~13.0.0, expo-web-browser@~13.0.3:
resolved "https://registry.npmjs.org/expo-web-browser/-/expo-web-browser-13.0.3.tgz"
integrity sha512-HXb7y82ApVJtqk8tManyudtTrCtx8xcUnVzmJECeHCB0SsWSQ+penVLZxJkcyATWoJOsFMnfVSVdrTcpKKGszQ==
expo@51:
version "51.0.38"
resolved "https://registry.yarnpkg.com/expo/-/expo-51.0.38.tgz#e4127b230454a34a507cfb9f1a2e4b3855cb0579"
integrity sha512-/B9npFkOPmv6WMIhdjQXEY0Z9k/67UZIVkodW8JxGIXwKUZAGHL+z1R5hTtWimpIrvVhyHUFU3f8uhfEKYhHNQ==
dependencies:
"@babel/runtime" "^7.20.0"
"@expo/cli" "0.18.30"
"@expo/config" "9.0.4"
"@expo/config-plugins" "8.0.10"
"@expo/metro-config" "0.18.11"
"@expo/vector-icons" "^14.0.3"
babel-preset-expo "~11.0.15"
expo-asset "~10.0.10"
expo-file-system "~17.0.1"
expo-font "~12.0.10"
expo-keep-awake "~13.0.2"
expo-modules-autolinking "1.11.3"
expo-modules-core "1.12.26"
fbemitter "^3.0.0"
whatwg-url-without-unicode "8.0.0-3"
expo@~51.0.24:
version "51.0.34"
resolved "https://registry.npmjs.org/expo/-/expo-51.0.34.tgz"