import {
View,
Text,
Platform,
StyleSheet,
SafeAreaView,
StatusBar,
Dimensions,
FlatList,
Pressable,
Image,
} from "react-native";
import { connect } from "react-redux";
import React from "react";
import { useNavigation } from "@react-navigation/native";
//components
import Navbar from "../../../components/Navbar";
//style
import fontSize from "../../../constants/fontSize";
import tw from "tailwind-rn";
import Colors from "../../../constants/Colors";
//variables
const ios = Platform.OS === "ios";
const { width, height } = Dimensions.get("window");
const MoreBlog = ({ mobile, theme, blogs }) => {
const styles = React.useMemo(() => {
return StyleSheet.create({
contentContainerStyle: {
paddingBottom: 100,
},
container: {
flexDirection: "column",
paddingVertical: 5,
paddingHorizontal: 16,
},
});
}, [theme]);
return (
}
keyExtractor={(item) => item.id}
contentContainerStyle={{ paddingBottom: height / 2 }}
/>
);
};
const Blog = ({ blog, theme }) => {
const navigation = useNavigation();
return (
navigation.push("Blog", { id: blog?.id })}
>
{blog?.title}
);
};
// `w-[${state + '%'}]`
const mapStateToProps = (state) => ({
mobile: state.publicApi.mobile,
theme: state.publicApi.theme,
blogs: state.blog.list,
});
export default connect(mapStateToProps)(MoreBlog);