-
Notifications
You must be signed in to change notification settings - Fork 0
/
_layout.jsx
43 lines (38 loc) · 1.13 KB
/
_layout.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { Provider } from "react-redux";
import { PersistGate } from "redux-persist/integration/react";
import { store, persistor } from "./(redux)/store";
import { SafeAreaView } from "react-native-safe-area-context";
import { Slot } from "expo-router";
import Header from "../components/Header";
import Toast, { BaseToast } from "react-native-toast-message";
// SplashScreen.preventAutoHideAsync();
export default function Layout() {
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<SafeAreaView>
<Header />
<Slot />
<Toast topOffset={150} config={toastConfig} visibilityTime={1000} />
</SafeAreaView>
</PersistGate>
</Provider>
);
}
const toastConfig = {
/*
Overwrite 'success' type,
by modifying the existing `BaseToast` component
*/
success: (props) => (
<BaseToast
{...props}
style={{ borderLeftColor: "#4BB543" }}
contentContainerStyle={{ paddingHorizontal: 15 }}
text1Style={{
fontSize: 15,
fontWeight: "400",
}}
/>
),
};