From 0309c2b8690a77d987b764125aadd00cb16ea582 Mon Sep 17 00:00:00 2001 From: Govard Barkhatov Date: Fri, 9 Aug 2024 19:39:17 +0200 Subject: [PATCH 1/3] no cancel --- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish.yaml | 8 ++++---- src/app/components/Modals/ErrorModal.tsx | 16 ++++++++++------ src/app/components/Staking/Staking.tsx | 8 +++++++- src/app/types/errors.ts | 1 + 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7083d434..b3976930 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,11 +3,11 @@ name: ci on: pull_request: branches: - - '**' + - "**" jobs: lint_test: uses: babylonlabs-io/.github/.github/workflows/reusable_node_lint_test.yml@v0.3.0 with: run-build: true - run-unit-tests: true \ No newline at end of file + run-unit-tests: true diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 96ed64c2..2c9f4030 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -3,10 +3,10 @@ name: docker_publish on: push: branches: - - 'main' - - 'dev' + - "main" + - "dev" tags: - - '*' + - "*" jobs: lint_test: @@ -14,7 +14,7 @@ jobs: with: run-build: true run-unit-tests: true - + docker_build: needs: [lint_test] runs-on: ubuntu-22.04 diff --git a/src/app/components/Modals/ErrorModal.tsx b/src/app/components/Modals/ErrorModal.tsx index 54660034..85ca4ae7 100644 --- a/src/app/components/Modals/ErrorModal.tsx +++ b/src/app/components/Modals/ErrorModal.tsx @@ -12,6 +12,7 @@ interface ErrorModalProps { errorMessage: string; errorState?: ErrorState; errorTime: Date; + noCancel?: boolean; } export const ErrorModal: React.FC = ({ @@ -20,6 +21,7 @@ export const ErrorModal: React.FC = ({ onRetry, errorMessage, errorState, + noCancel, errorTime, }) => { const { error, retryErrorAction } = useError(); @@ -93,12 +95,14 @@ export const ErrorModal: React.FC = ({

{getErrorMessage()}

- + {noCancel && ( + + )} {onRetry && (
- {noCancel && ( + {!noCancel && ( // Only show the cancel button if noCancel is false or undefined