Skip to content

Commit

Permalink
Update _layout.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Matheus-0217 committed Feb 1, 2025
1 parent eec056f commit 0d189a0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useRef } from "react";
import { Stack } from "expo-router";
import * as Notifications from "expo-notifications";
import { View } from "react-native";
import { LogBox, View } from "react-native";
import Toast from "react-native-toast-message";

Notifications.setNotificationHandler({
Expand All @@ -16,6 +16,10 @@ export default function AppLayout() {
const notificationListener = useRef<Notifications.Subscription>();
const responseListener = useRef<Notifications.Subscription>();

LogBox.ignoreLogs([
'JSI SQLiteAdapter not available',
]);

useEffect(() => {
notificationListener.current =
Notifications.addNotificationReceivedListener((notification) => {
Expand All @@ -39,15 +43,15 @@ export default function AppLayout() {

return (
<>
<View style={{ zIndex: 9999 }} testID="toast-view">
<View style={{ zIndex: 9999 }} testID="toast-view">
<Toast />
</View>
<Stack
screenOptions={{
header: () => <View style={{ height: 50 }} testID="stack-header"/>,
header: () => <View style={{ height: 50 }} testID="stack-header" />,
}}
/>
<View style={{ height: 25 }} testID="layout-view"/>
<View testID="layout-view" />
</>
);
}

0 comments on commit 0d189a0

Please sign in to comment.