Merge branch 'main' into dev

# Conflicts:
#	app/(auth)/_layout.tsx
This commit is contained in:
Milan Paunovic
2024-10-09 17:34:15 +02:00
7 changed files with 18465 additions and 15 deletions

View File

@ -34,7 +34,7 @@ jobs:
token: ${{ secrets.EXPO_TOKEN }} token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci --legacy-peer-deps
- name: Prebuild, Build and Submit - name: Prebuild, Build and Submit
run: npm run prebuild-build-submit-ios-cicd run: npm run prebuild-build-submit-ios-cicd

View File

@ -16,7 +16,7 @@
"supportsTablet": true, "supportsTablet": true,
"bundleIdentifier": "com.cally.app", "bundleIdentifier": "com.cally.app",
"googleServicesFile": "./ios/GoogleService-Info.plist", "googleServicesFile": "./ios/GoogleService-Info.plist",
"buildNumber": "15" "buildNumber": "18"
}, },
"android": { "android": {
"adaptiveIcon": { "adaptiveIcon": {

View File

@ -1,15 +1,11 @@
import SettingsPage from "@/components/pages/settings/SettingsPage"; import SettingsPage from "@/components/pages/settings/SettingsPage";
import { AuthContextProvider } from "@/contexts/AuthContext";
import {SettingsContextProvider} from "@/contexts/SettingsContext"; import {SettingsContextProvider} from "@/contexts/SettingsContext";
import React from "react"; import React from "react";
import { View } from "react-native-ui-lib";
export default function Screen() { export default function Screen() {
return ( return (
<AuthContextProvider>
<SettingsContextProvider> <SettingsContextProvider>
<SettingsPage/> <SettingsPage/>
</SettingsContextProvider> </SettingsContextProvider>
</AuthContextProvider>
); );
} }

View File

@ -17,6 +17,7 @@ import { ManuallyAddEventModal } from "@/components/pages/calendar/ManuallyAddEv
import { CalendarEvent, useCalendarContext } from "@/contexts/CalendarContext"; import { CalendarEvent, useCalendarContext } from "@/contexts/CalendarContext";
import { useSettingsContext } from "@/contexts/SettingsContext"; import { useSettingsContext } from "@/contexts/SettingsContext";
import EditEventDialog from "./EditEventDialog"; import EditEventDialog from "./EditEventDialog";
import {useGetEvents} from "@/hooks/firebase/useGetEvents";
const modeMap = new Map([ const modeMap = new Map([
[0, "day"], [0, "day"],
@ -63,7 +64,8 @@ export default function CalendarPage() {
>(undefined); >(undefined);
const calendarContainerRef = useRef(null); const calendarContainerRef = useRef(null);
const { events, familyEvents } = useCalendarContext(); // const { events, familyEvents } = useCalendarContext();
const {data: events} = useGetEvents()
const onLayout = (event: LayoutChangeEvent) => { const onLayout = (event: LayoutChangeEvent) => {
const { height } = event.nativeEvent.layout; const { height } = event.nativeEvent.layout;
@ -151,7 +153,7 @@ export default function CalendarPage() {
<Calendar <Calendar
bodyContainerStyle={styles.calHeader} bodyContainerStyle={styles.calHeader}
mode={mode} mode={mode}
events={isFamilyView ? familyEvents : events} events={isFamilyView ? events ?? [] : events ?? []}
eventCellStyle={{ backgroundColor: isFamilyView ? '#46a80a' : calendarColor }} eventCellStyle={{ backgroundColor: isFamilyView ? '#46a80a' : calendarColor }}
onPressEvent={(event) => { onPressEvent={(event) => {
setEditVisible(true); setEditVisible(true);

View File

@ -41,6 +41,13 @@ export const useCreateEventFromProvider = () => {
await firestore() await firestore()
.collection("Events") .collection("Events")
.add({...eventData, creatorId: currentUser?.uid}) .add({...eventData, creatorId: currentUser?.uid})
} else {
console.log("ENTER HERE")
const docId = snapshot.docs[0].id;
await firestore()
.collection("Events")
.doc(docId)
.update({...eventData, creatorId: currentUser?.uid});
} }
} catch (e) { } catch (e) {
console.error(e) console.error(e)

View File

@ -45,7 +45,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>15</string> <string>18</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>
@ -78,6 +78,9 @@
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string> <string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string> <string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string> <string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
</array> </array>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>SplashScreen</string> <string>SplashScreen</string>

18442
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff