mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 00:24:53 +00:00
reorganized calendar page, fixes
This commit is contained in:
@ -37,6 +37,7 @@ import { RouteProp } from "@react-navigation/core";
|
||||
import RefreshButton from "@/components/shared/RefreshButton";
|
||||
import { useCalSync } from "@/hooks/useCalSync";
|
||||
import {useIsFetching} from "@tanstack/react-query";
|
||||
import { CalendarHeader } from "@/components/pages/calendar/CalendarHeader";
|
||||
|
||||
type DrawerParamList = {
|
||||
index: undefined;
|
||||
@ -101,6 +102,24 @@ export default function TabLayout() {
|
||||
headerShown: true,
|
||||
headerTitleAlign:
|
||||
Device.deviceType === DeviceType.TABLET ? "left" : "center",
|
||||
headerTitle: ({ children }) => {
|
||||
const isCalendarRoute = ["calendar", "index"].includes(route.name);
|
||||
|
||||
if (isCalendarRoute && Device.deviceType !== DeviceType.TABLET) {
|
||||
return <View centerV><CalendarHeader /></View>;
|
||||
}
|
||||
|
||||
return (
|
||||
<Text
|
||||
style={{
|
||||
fontFamily: "Manrope_600SemiBold",
|
||||
fontSize: Device.deviceType === DeviceType.TABLET ? 22 : 17,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</Text>
|
||||
);
|
||||
},
|
||||
headerTitleStyle: {
|
||||
fontFamily: "Manrope_600SemiBold",
|
||||
fontSize: Device.deviceType === DeviceType.TABLET ? 22 : 17,
|
||||
@ -121,7 +140,7 @@ export default function TabLayout() {
|
||||
|
||||
if (Device.deviceType !== DeviceType.TABLET || !showViewSwitch) {
|
||||
return isCalendarPage ? (
|
||||
<View marginR-16>
|
||||
<View marginR-8 >
|
||||
<RefreshButton onRefresh={onRefresh} isSyncing={isLoading} />
|
||||
</View>
|
||||
) : null;
|
||||
|
||||
Reference in New Issue
Block a user