|
|
|
@ -16,8 +16,12 @@ import Logo from "../../assets/images/logo.png"; |
|
|
|
|
|
|
|
|
|
const { width } = Dimensions.get("window"); |
|
|
|
|
|
|
|
|
|
//style
|
|
|
|
|
import Colors from "../../constants/Colors"; |
|
|
|
|
|
|
|
|
|
function Splash({ |
|
|
|
|
navigation, |
|
|
|
|
theme, |
|
|
|
|
isLogin, |
|
|
|
|
blogs, |
|
|
|
|
getBlogs, |
|
|
|
@ -26,7 +30,6 @@ function Splash({ |
|
|
|
|
userProducts, |
|
|
|
|
getUserProducts, |
|
|
|
|
setIsDark, |
|
|
|
|
theme, |
|
|
|
|
}) { |
|
|
|
|
const isFocused = useIsFocused(); |
|
|
|
|
const [out, setOut] = React.useState(false); |
|
|
|
@ -40,7 +43,7 @@ function Splash({ |
|
|
|
|
|
|
|
|
|
const getTheme = async () => { |
|
|
|
|
const theme = await AsyncStorage.getItem("theme"); |
|
|
|
|
setIsDark(theme); |
|
|
|
|
setIsDark(!theme ? "light" : theme); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const setOutHandler = React.useCallback( |
|
|
|
@ -121,7 +124,11 @@ function Splash({ |
|
|
|
|
}} |
|
|
|
|
/> |
|
|
|
|
</View> |
|
|
|
|
<ActivityIndicator size={"large"} style={{ marginTop: 20 }} /> |
|
|
|
|
<ActivityIndicator |
|
|
|
|
size={"large"} |
|
|
|
|
color={theme === "light" ? Colors.theme1.dark : Colors.theme1.white} |
|
|
|
|
style={{ marginTop: 20 }} |
|
|
|
|
/> |
|
|
|
|
</View> |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|