mirror of
https://github.com/urosran/cally.git
synced 2026-10-23 08:07:55 +00:00
tablet event and todo filtering
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React from "react";
|
||||
import React, { useEffect } from "react";
|
||||
import {RefreshControl, ScrollView, View} from "react-native";
|
||||
import CalendarPage from "@/components/pages/calendar/CalendarPage";
|
||||
import TabletCalendarPage from "@/components/pages/(tablet_pages)/calendar/TabletCalendarPage";
|
||||
@@ -6,10 +6,20 @@ import * as Device from "expo-device";
|
||||
import {DeviceType} from "expo-device";
|
||||
import {useCalSync} from "@/hooks/useCalSync";
|
||||
import {colorMap} from "@/constants/colorMap";
|
||||
import { useSetAtom } from "jotai";
|
||||
import { selectedUserAtom } from "@/components/pages/calendar/atoms";
|
||||
import { useAuthContext } from "@/contexts/AuthContext";
|
||||
|
||||
export default function Screen() {
|
||||
const isTablet = Device.deviceType === DeviceType.TABLET;
|
||||
const {resyncAllCalendars, isSyncing} = useCalSync();
|
||||
const setSelectedUser = useSetAtom(selectedUserAtom);
|
||||
const {profileData} = useAuthContext()
|
||||
|
||||
useEffect(() => {
|
||||
if(!isTablet && profileData) setSelectedUser({firstName: profileData.firstName, lastName: profileData.lastName, eventColor: profileData.eventColor})
|
||||
}, [])
|
||||
|
||||
|
||||
const onRefresh = React.useCallback(async () => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user