diff --git a/src/features/content/renderers/shared/DetailPageShell.tsx b/src/features/content/renderers/shared/DetailPageShell.tsx
index e4a2395..1a530fa 100644
--- a/src/features/content/renderers/shared/DetailPageShell.tsx
+++ b/src/features/content/renderers/shared/DetailPageShell.tsx
@@ -1,4 +1,4 @@
-import React, { type PropsWithChildren, useState } from "react";
+import React, { type PropsWithChildren } from "react";
import { Pressable, StyleSheet, View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import { Ionicons } from "@expo/vector-icons";
@@ -12,10 +12,10 @@ interface DetailPageShellProps extends PropsWithChildren {
title: string;
subtitle?: string;
onBack?: () => void;
+ rightAction?: React.ReactNode;
}
-export function DetailPageShell({ children, onBack }: DetailPageShellProps) {
- const [isFavorite, setIsFavorite] = useState(false);
+export function DetailPageShell({ children, onBack, rightAction }: DetailPageShellProps) {
const { moduleCode } = useLocalSearchParams<{ moduleCode?: string }>();
const currentModuleCode = typeof moduleCode === "string" ? moduleCode : "";
const moduleDisplay = useModuleDisplayName(currentModuleCode);
@@ -34,21 +34,12 @@ export function DetailPageShell({ children, onBack }: DetailPageShellProps) {
) : null;
- const favoriteAction = (
- setIsFavorite((value) => !value)}
- style={({ pressed }) => [styles.iconButton, pressed && styles.pressed]}
- >
-
-
- );
+ const headerActions = searchAction || rightAction ? (
+
+ {searchAction}
+ {rightAction}
+
+ ) : undefined;
return (
@@ -64,12 +55,7 @@ export function DetailPageShell({ children, onBack }: DetailPageShellProps) {
currentModuleCode ? `Open ${moduleDisplay.name} home` : moduleDisplay.name
}
fallbackRoute={moduleDisplay.homeRoute}
- right={
-
- {searchAction}
- {favoriteAction}
-
- }
+ right={headerActions}
/>
{children}