reza fixed blog

master
Reza_ashrafi 3 years ago
parent e0c8e500b2
commit d657813b31
  1. 6
      src/screens/Blog/index.js
  2. 5
      src/screens/Blogs/index.js
  3. 11
      src/screens/Home/components/MyBooks.js

@ -17,7 +17,6 @@ import { LinearGradient } from "expo-linear-gradient";
import HTMLView from "react-native-htmlview"; import HTMLView from "react-native-htmlview";
//components //components
import Hashtags from "../Blogs/layouts/Hashtags";
import Header from "../Blogs/layouts/Header"; import Header from "../Blogs/layouts/Header";
import New from "../Blogs/layouts/New"; import New from "../Blogs/layouts/New";
import Navbar from "../../components/Navbar"; import Navbar from "../../components/Navbar";
@ -76,7 +75,6 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
style={[styles.container, tw("flex")]} style={[styles.container, tw("flex")]}
> >
<View style={tw("flex px-4 pb-24")}> <View style={tw("flex px-4 pb-24")}>
<Hashtags />
<View <View
style={[ style={[
tw("w-full rounded-sm overflow-hidden relative"), tw("w-full rounded-sm overflow-hidden relative"),
@ -184,7 +182,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
stylesheet={{ stylesheet={{
p: { p: {
color: color:
theme === "bold" theme === "light"
? Colors.theme1.gray20 ? Colors.theme1.gray20
: Colors.theme1.grayF9, : Colors.theme1.grayF9,
textAlign: "right", textAlign: "right",
@ -223,7 +221,7 @@ export const Blog = ({ getInfo, blog, getList, blogs, route, theme }) => {
horizontal={true} horizontal={true}
inverted={true} inverted={true}
style={[tw("flex flex-row mt-3 pb-3")]} style={[tw("flex flex-row mt-3 pb-3")]}
data={blogs} data={blogs.filter((blog) => blog.id !== route.params.id)}
renderItem={({ item }) => <New blog={item} />} renderItem={({ item }) => <New blog={item} />}
keyExtractor={(item, index) => { keyExtractor={(item, index) => {
return item.id; return item.id;

@ -15,7 +15,7 @@ import { blog } from "../../redux/actions";
//components //components
import Navbar from "../../components/Navbar"; import Navbar from "../../components/Navbar";
import Drawer from "../../components/Drawer"; import Drawer from "../../components/Drawer";
import Hashtags from "./layouts/Hashtags"; // import Hashtags from "./layouts/Hashtags";
import Header from "./layouts/Header"; import Header from "./layouts/Header";
import Single from "./layouts/Single"; import Single from "./layouts/Single";
import New from "./layouts/New"; import New from "./layouts/New";
@ -60,7 +60,7 @@ function Blogs({ getList, blogs }) {
contentContainerStyle={styles.contentContainerStyle} contentContainerStyle={styles.contentContainerStyle}
style={[styles.container, tw("flex px-4")]} style={[styles.container, tw("flex px-4")]}
> >
<Hashtags /> {/* <Hashtags /> */}
<Single /> <Single />
<Header title={"تازهترینها از وبلاگ"} /> <Header title={"تازهترینها از وبلاگ"} />
<FlatList <FlatList
@ -102,6 +102,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(Blogs);
const styles = StyleSheet.create({ const styles = StyleSheet.create({
contentContainerStyle: { contentContainerStyle: {
paddingBottom: 100, paddingBottom: 100,
paddingTop : 30
}, },
container: { container: {
paddingVertical: 0, paddingVertical: 0,

@ -12,15 +12,18 @@ import fontSize from "../../../constants/fontSize";
const ios = Platform.OS === "ios"; const ios = Platform.OS === "ios";
function MyBooks({ books, grades, theme }) { function MyBooks({ books, grades, theme }) {
console.log(books);
return books?.filter((book) => book.condition >= 2).length ? ( return books?.filter((book) => book.condition >= 2).length ? (
<View style={[tw("flex w-full mb-5")]}> <View style={[tw("flex w-full mb-5")]}>
<View <View
style={[ style={[
tw(`w-full flex rounded-md pt-3 overflow-hidden`), tw(`w-full flex rounded-md pt-3 overflow-hidden`),
{ {
backgroundColor: theme === 'light' ? Colors.theme1.greenCF + "0F" : Colors.theme1.greenCF + '11', backgroundColor:
borderColor: Colors.theme1.greenD9 + (theme === 'light' ? "" : "77"), theme === "light"
? Colors.theme1.greenCF + "0F"
: Colors.theme1.greenCF + "11",
borderColor:
Colors.theme1.greenD9 + (theme === "light" ? "" : "77"),
borderWidth: 1, borderWidth: 1,
}, },
]} ]}
@ -38,7 +41,7 @@ function MyBooks({ books, grades, theme }) {
> >
کتابهای من کتابهای من
</Text> </Text>
<FlatList <FlatList
showsHorizontalScrollIndicator={false} showsHorizontalScrollIndicator={false}
style={[tw("py-3")]} style={[tw("py-3")]}

Loading…
Cancel
Save