Skip to content

Commit 97f8a64

Browse files
authored
fix 'when first trying to press “reload card” on the flash card page, it’s not working' issue (#234)
1 parent 1942037 commit 97f8a64

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/screens/card-screen/card.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ export const CardScreen: React.FC<Props> = ({ navigation }) => {
124124

125125
const { LL } = useI18nContext()
126126

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

250249
let ListEmptyContent: React.ReactNode
251250

252-
if (loading || !initialized) {
251+
if (!initialized || priceLoading) {
253252
ListEmptyContent = (
254253
<View style={styles.activityIndicatorContainer}>
255254
<ActivityIndicator size="large" color={colors.primary} />
@@ -416,7 +415,7 @@ export const CardScreen: React.FC<Props> = ({ navigation }) => {
416415
/>
417416
</>
418417
)}
419-
{(!cardHtml || !refreshBalance) && (
418+
{(!cardHtml || !refreshBalance) && !priceLoading && (
420419
<ModalNfcFlashcard
421420
isActive={displayReceiveNfc}
422421
setIsActive={setDisplayReceiveNfc}

0 commit comments

Comments
 (0)