import React from 'react';
import { BackHandler } from 'react-native';
import { useNavigation, NavigationProp, useFocusEffect } from '@react-navigation/native';
import { RootStackParamList } from '@/types';
import Html from '@/components/HtmlRender';
const htmlContent = `
`;
const DahsboardScreen = () => {
const navigation = useNavigation
>();
useFocusEffect(
React.useCallback(() => {
const onBackPress = () => {
navigation.navigate("home");
return true; // Prevent default behavior (exit app)
};
BackHandler.addEventListener('hardwareBackPress', onBackPress);
navigation.setOptions({ headerLeft: () => null }); // Remove back button
return () => {
BackHandler.removeEventListener('hardwareBackPress', onBackPress);
};
}, [navigation])
);
const Action = {
openMenuAction: function (prop: any) {
const menu: string = prop?.menu;
navigation.navigate(menu);
}
};
return (
);
};
export default DahsboardScreen;