Unverified Commit ec9d389d authored by benguedj's avatar benguedj Committed by GitHub
Browse files

fix: πŸ› Corrige l'initialisation de Matomo (#582)

βœ… Closes: #518
parent cbdca2de
......@@ -42,14 +42,14 @@ initMonitoring();
// eslint-disable-next-line @typescript-eslint/naming-convention
const customFonts = { IcoMoon: IcomoonFont };
const App: FC = () => {
const { trackScreenView } = useMatomo();
const MainAppContainer: FC = () => {
const { trackAppStart, trackScreenView } = useMatomo();
const isLoadingComplete = useCachedResources();
const colorScheme = useColorScheme();
// Load Custom Fonts (Icomoon)
const [fontsLoaded, setFontsLoaded] = useState(false);
const { trackAppStart } = useMatomo();
const [notification, setNotification] =
useState<Notifications.Notification | null>(null);
const notificationListener = useRef<Subscription>();
......@@ -80,6 +80,7 @@ const App: FC = () => {
useEffect(() => {
trackAppStart();
Font.loadAsync(customFonts)
.then(() => {
setFontsLoaded(true);
......@@ -129,20 +130,26 @@ const App: FC = () => {
return null;
} else {
return (
<MatomoProvider instance={TrackerUtils.matomoInstance}>
<ApolloProvider client={client}>
<SafeAreaProvider>
<Navigation
colorScheme={colorScheme}
notification={notification}
setNotification={setNotification}
/>
<StatusBar />
</SafeAreaProvider>
</ApolloProvider>
</MatomoProvider>
<ApolloProvider client={client}>
<SafeAreaProvider>
<Navigation
colorScheme={colorScheme}
notification={notification}
setNotification={setNotification}
/>
<StatusBar />
</SafeAreaProvider>
</ApolloProvider>
);
}
};
const App: FC = () => {
return (
<MatomoProvider instance={TrackerUtils.matomoInstance}>
<MainAppContainer />
</MatomoProvider>
);
};
export default App;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment