reza fixed compo colors before Blogs

master
Reza_ashrafi 2 years ago
parent 245ac4e981
commit 8022a81815
  1. 16
      src/screens/Blog/index.js

@ -9,7 +9,6 @@ import {
StyleSheet,
Platform,
Dimensions,
Appearance,
StatusBar,
} from "react-native";
import { WebView } from "react-native-webview";
@ -29,11 +28,9 @@ import fontSize from "../../constants/fontSize";
import Colors from "../../constants/Colors";
const ios = Platform.OS === "ios";
const { height, width } = Dimensions.get("window");
export const Blog = ({ getInfo, blog, getList, blogs, route }) => {
const colorScheme = Appearance.getColorScheme();
const { width } = Dimensions.get("window");
export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
useEffect(() => {
getInfo({ id: route.params.id });
if (blogs.length === 0) {
@ -100,7 +97,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route }) => {
<Text
style={{
fontFamily: "regular",
color: Colors.theme1[colorScheme].white,
color: Colors.theme1[theme].white,
fontSize: fontSize.tiny,
textAlign: ios ? "right" : "auto",
}}
@ -110,7 +107,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route }) => {
<Text
style={{
fontFamily: "regular",
color: Colors.theme1[colorScheme].white,
color: Colors.theme1[theme].white,
fontSize: fontSize.tiny,
textAlign: ios ? "right" : "auto",
}}
@ -123,7 +120,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route }) => {
<Text
style={{
fontFamily: "regular",
color: Colors.theme1[colorScheme].white,
color: Colors.theme1[theme].white,
fontSize: fontSize.sm,
textAlign: ios ? "left" : "left",
}}
@ -133,7 +130,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route }) => {
<Text
style={{
fontFamily: "regular",
color: Colors.theme1[colorScheme].white,
color: Colors.theme1[theme].white,
fontSize: fontSize.sm,
textAlign: ios ? "left" : "left",
}}
@ -196,6 +193,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route }) => {
const mapStateToProps = (state) => ({
blog: state.blog.blog,
blogs: state.blog.list,
theme: state.publicApi.theme
});
const mapDispatchToProps = {

Loading…
Cancel
Save