reza added loading to product button

master
Reza_ashrafi 2 years ago
parent da3341e43b
commit f9b9bbfdd5
  1. 2
      App.js
  2. 101
      src/screens/Product/components/Book.js
  3. 4
      src/screens/ShoppingCart/components/Product.js

@ -8,8 +8,6 @@ import { store, persistor } from "./src/redux/store";
import React from "react";
import { PersistGate } from "redux-persist/integration/react";
console.log(persistor);
const App = () => {
let [fontsLoaded] = useFonts({
light: require("./assets/fonts/Farsi/Light.ttf"),

@ -7,6 +7,7 @@ import {
TouchableHighlight,
Dimensions,
Platform,
ActivityIndicator,
} from "react-native";
import { useNavigation } from "@react-navigation/native";
import { product, userProduct } from "../../../redux/actions";
@ -295,20 +296,32 @@ function Book({
}
>
<>
<Text
style={{
fontFamily: "bold",
fontSize: fontSize.sm,
color:
{whichTypeAdded === "physical" && userProductsLoading ? (
<ActivityIndicator
color={
theme === "light"
? Colors.theme1.green79
: Colors.theme1.greenCF,
: Colors.theme1.greenCF
}
size={fontSize.sm}
/>
) : (
<Text
style={{
fontFamily: "bold",
fontSize: fontSize.sm,
color:
theme === "light"
? Colors.theme1.green79
: Colors.theme1.greenCF,
paddingVertical: 4,
}}
>
خرید نسخه فیزیکی کتاب
</Text>
)}
paddingVertical: 4,
}}
>
خرید نسخه فیزیکی کتاب
</Text>
<View style={tw("flex flex-row-reverse items-center")}>
<View style={tw("w-px h-full bg-green-300")}></View>
<View style={tw("flex")}>
@ -370,20 +383,31 @@ function Book({
}
>
<>
<Text
style={{
fontFamily: "bold",
fontSize: fontSize.sm,
color:
{whichTypeAdded === "digital" && userProductsLoading ? (
<ActivityIndicator
color={
theme === "light"
? Colors.theme1.green79
: Colors.theme1.greenCF,
: Colors.theme1.greenCF
}
size={fontSize.sm}
/>
) : (
<Text
style={{
fontFamily: "bold",
fontSize: fontSize.sm,
color:
theme === "light"
? Colors.theme1.green79
: Colors.theme1.greenCF,
paddingVertical: 4,
}}
>
خرید نسخه دیجیتال کتاب
</Text>
paddingVertical: 4,
}}
>
خرید نسخه دیجیتال کتاب
</Text>
)}
<View style={tw("flex")}>
<Text
style={[
@ -473,20 +497,31 @@ function Book({
}
>
<>
<Text
style={{
fontFamily: "bold",
fontSize: fontSize.sm,
color:
{whichTypeAdded === "video" && userProductsLoading ? (
<ActivityIndicator
color={
theme === "light"
? Colors.theme1.green79
: Colors.theme1.greenCF,
: Colors.theme1.greenCF
}
size={fontSize.sm}
/>
) : (
<Text
style={{
fontFamily: "bold",
fontSize: fontSize.sm,
color:
theme === "light"
? Colors.theme1.green79
: Colors.theme1.greenCF,
paddingVertical: 4,
}}
>
خرید دوره ویدئویی کتاب
</Text>
paddingVertical: 4,
}}
>
خرید دوره ویدئویی کتاب
</Text>
)}
<View style={tw("flex flex-row-reverse")}>
<View style={tw("w-px h-full bg-green-500")}></View>
<Text

@ -35,8 +35,8 @@ function Product({
const types = {
0: "نسخه دیجیتال",
1: "نسخه فیزیکی",
2: "نسخه ویدئویی",
2: "نسخه فیزیکی",
4: "نسخه ویدئویی",
};
const submit = async (action) => {

Loading…
Cancel
Save