update 10 files

master
Reza_ashrafi 3 years ago
parent e7bd957157
commit 9e67bae334
  1. 2
      src/components/CustomTextInput.js
  2. 2
      src/redux/reducers/blog.js
  3. 2
      src/screens/Blogs/index.js
  4. 21
      src/screens/Blogs/layouts/Hashtags.js
  5. 18
      src/screens/Home/components/Header.js
  6. 6
      src/screens/Home/index.js
  7. 1
      src/screens/Login/index.js
  8. 1
      src/screens/Otp/index.js
  9. 2
      src/screens/Videos/components/MostViewedVideo.js

@ -25,6 +25,7 @@ const FloatingLabelInput = ({
theme,
defaultValue,
editable = true,
onSubmitEditing = () => {},
...props
}) => {
const [isFocused, setIsFocused] = React.useState(false);
@ -96,6 +97,7 @@ const FloatingLabelInput = ({
multiline={multiline}
editable={editable}
placeholderTextColor={theme === 'light' ? Colors.theme1.gray20 + 'aa' : Colors.theme1.white + '55'}
onSubmitEditing={() => onSubmitEditing()}
/>
</View>
);

@ -4,7 +4,7 @@ const initialState = {
list: null,
info: null,
hashtags : [],
hashtag : null,
hashtag : "همه",
};
export default function blog(state = initialState, action) {
let { type, data } = action;

@ -75,7 +75,7 @@ function Blogs({ getList, blogs, hashtag, setHashtag, theme }) {
/>
<Drawer setBoxPosition={setBoxPosition} position={position} />
<Hashtags />
{hashtag ? (
{hashtag !== 'همه' ? (
<FlatList
contentContainerStyle={styles.contentContainerStyle}
style={tw("px-4")}

@ -13,7 +13,9 @@ export const Hashtags = ({ hashtags, theme, setHashtag, hashtag }) => {
return (
<View
style={[
tw("flex flex-row-reverse pl-3 rounded-full items-center w-full mb-7 mt-3"),
tw(
"flex flex-row-reverse pl-3 rounded-full items-center w-full mb-7 mt-3"
),
{
borderWidth: 2,
borderColor: Colors.theme1.greenFF1 + (theme === "light" ? "" : "55"),
@ -35,13 +37,13 @@ export const Hashtags = ({ hashtags, theme, setHashtag, hashtag }) => {
horizontal={true}
inverted={true}
style={[tw("flex flex-row mt-3 pb-3 mr-2")]}
data={hashtags}
data={["همه", ...hashtags]}
renderItem={({ item }) => (
<Hashtag
hashtag={item}
theme={theme}
setHashtag={setHashtag}
activeTag={hashtag}
activeTag={hashtag || "همه"}
/>
)}
keyExtractor={(item, index) => {
@ -56,9 +58,20 @@ const Hashtag = ({ hashtag, theme, setHashtag, activeTag }) => {
const active = React.useMemo(() => {
return activeTag === hashtag;
}, [hashtag, activeTag]);
return (
<Pressable
onPress={() => (active ? setHashtag(null) : setHashtag(hashtag))}
onPress={() => {
if (hashtag === "همه") {
return setHashtag("همه");
} else {
if (active) {
setHashtag("همه");
} else {
setHashtag(hashtag);
}
}
}}
>
<Text
style={[

@ -21,7 +21,8 @@ const Header = ({ title, route, mobile, theme, state = null }) => {
<Text
style={[
{
color: theme === 'light' ? Colors.theme1.green79 : Colors.theme1.white,
color:
theme === "light" ? Colors.theme1.green79 : Colors.theme1.white,
fontFamily: "demi",
fontSize: fontSize.lg,
},
@ -34,11 +35,16 @@ const Header = ({ title, route, mobile, theme, state = null }) => {
onPress={() => navigation.navigate(route, state)}
style={{ transform: [{ translateX: -fontSize.xl6 / 3 }] }}
>
<Entypo
name="chevron-small-left"
size={fontSize.xl6}
color={theme === 'light' ? Colors.theme1.green79 : Colors.theme1.white}
/>
<Text
style={{
color:
theme === "light" ? Colors.theme1.green79 : Colors.theme1.white,
fontSize: fontSize.sm,
fontFamily: "light",
}}
>
مشاهده همه
</Text>
</Pressable>
) : null}
</View>

@ -50,9 +50,11 @@ const Home = ({
React.useEffect(() => {
if (!blogs) {
getBlogs();
} else if (!books) {
}
if (!books) {
getBooks({ vod: true });
} else if (!userProducts) {
}
if (!userProducts) {
getUserProducts();
}
}, []);

@ -155,6 +155,7 @@ function Login(props) {
autoFocus={true}
direction="ltr"
regex={(text) => onInput.phonenumber(text)}
onSubmitEditing={() => submit()}
/>
</View>
{!props.mobile ? <View style={tw("mt-10")}></View> : null}

@ -350,6 +350,7 @@ function Otp(props) {
regex={onInput.numberOnly}
direction="ltr"
keyboardType="numeric"
onSubmitEditing={() => submit()}
/>
</View>
<TouchableOpacity

@ -110,7 +110,7 @@ function MostViewedVideo({ videos, grades, mobile, theme }) {
},
]}
>
{separate(video?.product[2]?.price)}
{console.log(video?.product?.filter((product) => product?.productType === 4)[0]?.price)}
</Text>
</View>

Loading…
Cancel
Save