reza added loading to product button

master
Reza_ashrafi 3 years ago
parent da3341e43b
commit f9b9bbfdd5
  1. 2
      App.js
  2. 35
      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,6 +296,16 @@ function Book({
}
>
<>
{whichTypeAdded === "physical" && userProductsLoading ? (
<ActivityIndicator
color={
theme === "light"
? Colors.theme1.green79
: Colors.theme1.greenCF
}
size={fontSize.sm}
/>
) : (
<Text
style={{
fontFamily: "bold",
@ -309,6 +320,8 @@ function Book({
>
خرید نسخه فیزیکی کتاب
</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,6 +383,16 @@ function Book({
}
>
<>
{whichTypeAdded === "digital" && userProductsLoading ? (
<ActivityIndicator
color={
theme === "light"
? Colors.theme1.green79
: Colors.theme1.greenCF
}
size={fontSize.sm}
/>
) : (
<Text
style={{
fontFamily: "bold",
@ -384,6 +407,7 @@ function Book({
>
خرید نسخه دیجیتال کتاب
</Text>
)}
<View style={tw("flex")}>
<Text
style={[
@ -473,6 +497,16 @@ function Book({
}
>
<>
{whichTypeAdded === "video" && userProductsLoading ? (
<ActivityIndicator
color={
theme === "light"
? Colors.theme1.green79
: Colors.theme1.greenCF
}
size={fontSize.sm}
/>
) : (
<Text
style={{
fontFamily: "bold",
@ -487,6 +521,7 @@ function Book({
>
خرید دوره ویدئویی کتاب
</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