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