Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions app/(tabs)/(more)/index.ios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import {
} from "react-native";
import { LandingPagePicker } from "@/components/LandingPagePicker";
import { LogoutConfirmModal } from "@/components/LogoutConfirmModal";
import { getColors } from "@/constants/colors";
import { useAuth } from "@/contexts/AuthContext";
import { useQueryContext } from "@/contexts/QueryContext";
import { useUserProfile } from "@/hooks";
import { type LandingPage, useUserPreferences } from "@/hooks/useUserPreferences";
import { showErrorAlert, showSuccessAlert, showNotAvailableAlert } from "@/utils/alerts";
import { showErrorAlert, showNotAvailableAlert, showSuccessAlert } from "@/utils/alerts";
import { openInAppBrowser } from "@/utils/browser";
import { getAvatarUrl } from "@/utils/getAvatarUrl";
import { getColors } from "@/constants/colors";

interface MoreMenuItem {
name: string;
Expand Down Expand Up @@ -91,6 +91,12 @@ export default function More() {
// handleNotAvailable replaced by global showNotAvailableAlert

const menuItems: MoreMenuItem[] = [
{
name: "Out of Office",
icon: "airplane-outline",
isExternal: false,
onPress: () => router.push("/(tabs)/(ooo)"),
},
{
name: "Apps",
icon: "grid-outline",
Expand Down
15 changes: 13 additions & 2 deletions app/(tabs)/(more)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Ionicons } from "@expo/vector-icons";
import { useRouter } from "expo-router";
import { useState } from "react";
import {
Alert,
Expand All @@ -12,12 +13,12 @@ import {
import { Header } from "@/components/Header";
import { LandingPagePicker } from "@/components/LandingPagePicker";
import { LogoutConfirmModal } from "@/components/LogoutConfirmModal";
import { getColors } from "@/constants/colors";
import { useAuth } from "@/contexts/AuthContext";
import { useQueryContext } from "@/contexts/QueryContext";
import { type LandingPage, useUserPreferences } from "@/hooks/useUserPreferences";
import { showErrorAlert, showSuccessAlert } from "@/utils/alerts";
import { openInAppBrowser } from "@/utils/browser";
import { getColors } from "@/constants/colors";

interface MoreMenuItem {
name: string;
Expand All @@ -28,6 +29,7 @@ interface MoreMenuItem {
}

export default function More() {
const router = useRouter();
const { logout } = useAuth();
const { clearCache } = useQueryContext();
const { preferences, setLandingPage, landingPageLabel } = useUserPreferences();
Expand Down Expand Up @@ -80,6 +82,12 @@ export default function More() {
};

const menuItems: MoreMenuItem[] = [
{
name: "Out of Office",
icon: "airplane-outline",
isExternal: false,
onPress: () => router.push("/(tabs)/(ooo)"),
},
{
name: "Apps",
icon: "grid-outline",
Expand Down Expand Up @@ -156,7 +164,10 @@ export default function More() {
>
<View
className="border-b border-[#E5E5EA] bg-gray-50 px-4 py-2"
style={{ borderBottomColor: theme.border, backgroundColor: isDark ? "#2C2C2E" : undefined }}
style={{
borderBottomColor: theme.border,
backgroundColor: isDark ? "#2C2C2E" : undefined,
}}
>
<Text
className="text-xs font-semibold uppercase text-gray-500"
Expand Down
10 changes: 10 additions & 0 deletions app/(tabs)/(ooo)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Stack } from "expo-router";

export default function OOOLayout() {
return (
<Stack>
<Stack.Screen name="index" options={{}} />
<Stack.Screen name="create-entry" options={{}} />
</Stack>
);
}
Loading
Loading