Skip to content

Commit

Permalink
Remove ref from SaleErorView
Browse files Browse the repository at this point in the history
  • Loading branch information
mimi-imtbl committed Jun 27, 2024
1 parent db7eccf commit a5affc0
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {
useState, useEffect, useContext, useRef,
} from 'react';
import { useState, useEffect, useContext } from 'react';
import { BaseTokens } from '@biom3/design-tokens';
import { useTranslation } from 'react-i18next';
import { StatusType } from '../../../components/Status/StatusType';
Expand Down Expand Up @@ -46,8 +44,6 @@ export function SaleErrorView({
blockExplorerLink,
errorType,
}: SaleErrorViewProps) {
const mounted = useRef(false);

const { t } = useTranslation();
const {
goBackToPaymentMethods,
Expand Down Expand Up @@ -241,9 +237,7 @@ export function SaleErrorView({
};

useEffect(() => {
if (!environment || !currentErrorType || mounted.current) return;

mounted.current = true;
if (!environment || !currentErrorType) return;

addHandover({
animationUrl: getRemoteRive(
Expand Down

0 comments on commit a5affc0

Please sign in to comment.