Skip to content

Commit

Permalink
fix 'when first trying to press “reload card” on the flash card page,…
Browse files Browse the repository at this point in the history
… it’s not working' issue (#234)
  • Loading branch information
Nodirbek75 authored Aug 19, 2024
1 parent 1942037 commit 97f8a64
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/screens/card-screen/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export const CardScreen: React.FC<Props> = ({ navigation }) => {

const { LL } = useI18nContext()

const loading = false // placeholder for query loading if we need to load card data in the future
const [cardHtml, setCardHtml] = useState<string | null>(null)
const [cardTag, setCardTag] = useState<string | null>(null)
const [refreshBalance, setRefreshBalance] = useState<string | null>("false")
Expand Down Expand Up @@ -249,7 +248,7 @@ export const CardScreen: React.FC<Props> = ({ navigation }) => {

let ListEmptyContent: React.ReactNode

if (loading || !initialized) {
if (!initialized || priceLoading) {
ListEmptyContent = (
<View style={styles.activityIndicatorContainer}>
<ActivityIndicator size="large" color={colors.primary} />
Expand Down Expand Up @@ -416,7 +415,7 @@ export const CardScreen: React.FC<Props> = ({ navigation }) => {
/>
</>
)}
{(!cardHtml || !refreshBalance) && (
{(!cardHtml || !refreshBalance) && !priceLoading && (
<ModalNfcFlashcard
isActive={displayReceiveNfc}
setIsActive={setDisplayReceiveNfc}
Expand Down

0 comments on commit 97f8a64

Please sign in to comment.