[UI > Settings] Pass empty dependency array in CustomPage

This commit is contained in:
Beef 2023-04-09 19:14:32 +01:00
parent 4e1df66cc1
commit f89238cfce

View file

@ -49,7 +49,7 @@ export default function initSettings() {
title: "Vendetta Page", title: "Vendetta Page",
render: ({ render: PageView, ...options }: { render: React.ComponentType }) => { render: ({ render: PageView, ...options }: { render: React.ComponentType }) => {
const navigation = NavigationNative.useNavigation(); const navigation = NavigationNative.useNavigation();
React.useEffect(() => options && navigation.setOptions(options)); React.useEffect(() => options && navigation.setOptions(options), []);
// TODO: Is wrapping this in ErrorBoundary a good idea? // TODO: Is wrapping this in ErrorBoundary a good idea?
return <ErrorBoundary><PageView /></ErrorBoundary>; return <ErrorBoundary><PageView /></ErrorBoundary>;
} }