Skip to content

Commit

Permalink
feat: loading indicator on tx screen (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleSamtoshi authored Jun 23, 2022
1 parent d61ca4a commit 1ce3433
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/screens/transaction-screen/transaction-screen.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ApolloError, useReactiveVar } from "@apollo/client"
import { StackNavigationProp } from "@react-navigation/stack"
import * as React from "react"
import { SectionList, Text, View } from "react-native"
import { ActivityIndicator, SectionList, Text, View } from "react-native"
import EStyleSheet from "react-native-extended-stylesheet"
import { TouchableOpacity } from "react-native-gesture-handler"
import Icon from "react-native-vector-icons/Ionicons"
Expand All @@ -24,6 +24,7 @@ const styles = EStyleSheet.create({

icon: { color: palette.darkGrey, top: -4 },

loadingContainer: { justifyContent: "center", alignItems: "center", flex: 1 },
noTransactionText: {
fontSize: "24rem",
},
Expand Down Expand Up @@ -87,7 +88,11 @@ export const TransactionHistoryScreenDataInjected: ScreenType = ({
}

if (!data?.me?.defaultAccount) {
return null
return (
<View style={styles.loadingContainer}>
<ActivityIndicator color={palette.coolGrey} size={"large"} />
</View>
)
}

const { edges, pageInfo } = data.me.defaultAccount.transactions
Expand Down

0 comments on commit 1ce3433

Please sign in to comment.