reza fixed compo colors before Blog

master
Reza_ashrafi 3 years ago
parent b424046245
commit 245ac4e981
  1. 8
      src/screens/AR/components/Book.js

@ -1,4 +1,4 @@
import { Pressable, Text, Image, Dimensions, Appearance } from "react-native"; import { Pressable, Text, Image, Dimensions } from "react-native";
import React from "react"; import React from "react";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { useNavigation } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native";
@ -11,9 +11,8 @@ import Colors from "../../../constants/Colors";
const { width, height } = Dimensions.get("window"); const { width, height } = Dimensions.get("window");
const Book = ({ book, mobile }) => { const Book = ({ book, mobile, theme }) => {
const navigation = useNavigation(); const navigation = useNavigation();
const colorScheme = Appearance.getColorScheme();
return ( return (
<Pressable <Pressable
style={[ style={[
@ -39,7 +38,7 @@ const Book = ({ book, mobile }) => {
fontFamily: "bold", fontFamily: "bold",
fontSize: fontSize.tiny, fontSize: fontSize.tiny,
marginTop: 10, marginTop: 10,
color: Colors.theme1[colorScheme].green79, color: Colors.theme1[theme].green79,
}, },
]} ]}
> >
@ -51,6 +50,7 @@ const Book = ({ book, mobile }) => {
const mapStateToProps = (state) => ({ const mapStateToProps = (state) => ({
mobile: state.publicApi.mobile, mobile: state.publicApi.mobile,
theme: state.publicApi.theme
}); });
export default connect(mapStateToProps)(Book); export default connect(mapStateToProps)(Book);

Loading…
Cancel
Save