Add: components/Button/BackButtonFromNotification.tsx types/type-collect-other.ts Fix: - android/app/build.gradle - app/(application)/(user)/_layout.tsx - app/(application)/(user)/event/(tabs)/_layout.tsx - app/(application)/(user)/event/(tabs)/status.tsx - app/(application)/(user)/event/create.tsx - app/(application)/(user)/job/(tabs)/_layout.tsx - app/(application)/(user)/notifications/index.tsx - app/(application)/admin/event/[id]/[status]/index.tsx - app/(application)/admin/event/[id]/reject-input.tsx - app/(application)/admin/notification/index.tsx - components/Notification/NotificationInitializer.tsx - hipmi-note.md - hooks/use-notification-store.tsx - screens/Admin/Event/funUpdateStatus.ts - service/api-notifications.ts - utils/formatChatTime.ts ### No Issue
62 lines
1.6 KiB
TypeScript
62 lines
1.6 KiB
TypeScript
/* eslint-disable react-hooks/exhaustive-deps */
|
|
import { BackButton } from "@/components";
|
|
import { IconHome, IconStatus } from "@/components/_Icon";
|
|
import BackButtonFromNotification from "@/components/Button/BackButtonFromNotification";
|
|
import { TabsStyles } from "@/styles/tabs-styles";
|
|
import { Ionicons } from "@expo/vector-icons";
|
|
import {
|
|
router,
|
|
Tabs,
|
|
useLocalSearchParams,
|
|
useNavigation
|
|
} from "expo-router";
|
|
import { useLayoutEffect } from "react";
|
|
|
|
export default function JobTabsLayout() {
|
|
const navigation = useNavigation();
|
|
|
|
const { from, category } = useLocalSearchParams<{
|
|
from?: string;
|
|
category?: string;
|
|
}>();
|
|
|
|
// Atur header secara dinamis
|
|
useLayoutEffect(() => {
|
|
navigation.setOptions({
|
|
headerLeft: () => (
|
|
<BackButtonFromNotification from={from as string} category={category as string} />
|
|
),
|
|
});
|
|
}, [from, router, navigation]);
|
|
|
|
return (
|
|
<>
|
|
<Tabs screenOptions={TabsStyles}>
|
|
<Tabs.Screen
|
|
name="index"
|
|
options={{
|
|
title: "Beranda",
|
|
tabBarIcon: ({ color }) => <IconHome color={color} />,
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="status"
|
|
options={{
|
|
title: "Status",
|
|
tabBarIcon: ({ color }) => <IconStatus color={color} />,
|
|
}}
|
|
/>
|
|
<Tabs.Screen
|
|
name="archive"
|
|
options={{
|
|
title: "Arsip",
|
|
tabBarIcon: ({ color }) => (
|
|
<Ionicons size={20} name="archive" color={color} />
|
|
),
|
|
}}
|
|
/>
|
|
</Tabs>
|
|
</>
|
|
);
|
|
}
|