Skip to content

Commit

Permalink
Merge pull request #10 from multiversx/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
radumojic authored Nov 1, 2023
2 parents ffd7aab + 4427c65 commit a0e2d9b
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 13 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/deploy-devnet-old.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: deploy-devnet-old

on:
push:
branches: [main]
repository_dispatch:
types: deploy-devnet-old
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
ref: main
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Setup yarn
run: npm install -g yarn
- run: npm config set '//npm.fontawesome.com/:_authToken' "${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}"
- run: yarn install
- run: yarn run prepare-pro-icons
- run: yarn run build-devnet-old
env:
CI: false
VITE_APP_MARKERS_API_URL: ${{ secrets.MARKERS_API_URL }}
VITE_APP_VERSION_URL: ${{ secrets.APP_VERSION_URL }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: 'us-east-1'
- name: Deploy to S3 bucket
run: aws s3 sync ./build/ s3://${{ secrets.AWS_S3_BUCKET_DEVNET_OLD }} --delete
- name: No-cache index.html
run: aws s3 cp s3://${{ secrets.AWS_S3_BUCKET_DEVNET_OLD }}/index.html s3://${{ secrets.AWS_S3_BUCKET_DEVNET_OLD }}/index.html --metadata-directive REPLACE --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html --acl public-read
- name: Slack Notification
uses: rtCamp/action-slack-notify@master
env:
SLACK_ICON_EMOJI: ':globe_with_meridians:'
SLACK_USERNAME: ${{ secrets.AWS_S3_BUCKET_DEVNET_OLD }}
SLACK_MESSAGE: ${{ secrets.AWS_S3_BUCKET_DEVNET_OLD }}
SLACK_FOOTER: ''
MSG_MINIMAL: true
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dist-ssr
/src/config/*
!/src/config.devnet.ts
!/src/config.devnet2.ts
!/src/config.devnet-old.ts
!/src/config.testnet.ts
!/src/config.mainnet.ts
!/src/config.multiple.ts
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@
"start": "cross-env VITE_APP_CACHE_BUST=$(git rev-parse --short HEAD || echo 'local') vite",
"start-devnet": "yarn run copy-devnet-config & cross-env VITE_APP_SHARE_PREFIX=devnet- yarn run start",
"start-devnet2": "yarn run copy-devnet2-config & cross-env VITE_APP_SHARE_PREFIX=devnet2- yarn run start",
"start-devnet-old": "yarn run copy-devnet-old-config & cross-env VITE_APP_SHARE_PREFIX=devnet-old- yarn run start",
"start-mainnet": "yarn run copy-mainnet-config & yarn run start",
"start-testnet": "yarn run copy-testnet-config & cross-env VITE_APP_SHARE_PREFIX=testnet- yarn run start",
"build-devnet": "yarn run copy-devnet-config & cross-env VITE_APP_SHARE_PREFIX=devnet- VITE_APP_GA_ID=G-QE38EW59B8 yarn run build",
"build-devnet2": "yarn run copy-devnet2-config & cross-env VITE_APP_SHARE_PREFIX=devnet2- VITE_APP_GA_ID=G-QE38EW59B8 yarn run build",
"build-devnet-old": "yarn run copy-devnet-old-config & cross-env VITE_APP_SHARE_PREFIX=devnet-old- VITE_APP_GA_ID=G-QE38EW59B8 yarn run build",
"build-mainnet": "yarn run copy-mainnet-config & cross-env VITE_APP_SHARE_PREFIX= VITE_APP_GA_ID=G-EFN7QYSMQS yarn run build",
"build-testnet": "yarn run copy-testnet-config & cross-env VITE_APP_SHARE_PREFIX=testnet- VITE_APP_GA_ID=G-EFN7QYSMQS yarn run build",
"build-staging": "yarn run copy-mainnet-config & cross-env VITE_APP_SHARE_PREFIX=staging- VITE_APP_GA_ID=G-EFN7QYSMQS VITE_APP_IS_STAGING=true yarn run build",
Expand All @@ -65,18 +67,21 @@
"preview": "vite preview",
"copy-devnet-config": "run-script-os",
"copy-devnet2-config": "run-script-os",
"copy-devnet-old-config": "run-script-os",
"copy-mainnet-config": "run-script-os",
"copy-testnet-config": "run-script-os",
"copy-multiple-config": "run-script-os",
"copy-base-interceptor": "run-script-os",
"copy-devnet-config:nix": "cp ./src/config/config.devnet.ts ./src/config/index.ts",
"copy-devnet2-config:nix": "cp ./src/config/config.devnet2.ts ./src/config/index.ts",
"copy-devnet-old-config:nix": "cp ./src/config/config.devnet-old.ts ./src/config/index.ts",
"copy-mainnet-config:nix": "cp ./src/config/config.mainnet.ts ./src/config/index.ts",
"copy-testnet-config:nix": "cp ./src/config/config.testnet.ts ./src/config/index.ts",
"copy-multiple-config:nix": "cp ./src/config/config.multiple.ts ./src/config/index.ts",
"copy-base-interceptor:nix": "cp ./src/interceptors/Interceptor.tsx ./src/interceptors/index.tsx",
"copy-devnet-config:windows": "copy .\\src\\config\\config.devnet.ts .\\src\\config\\index.ts",
"copy-devnet2-config:windows": "copy .\\src\\config\\config.devnet2.ts .\\src\\config\\index.ts",
"copy-devnet-old-config:windows": "copy .\\src\\config\\config.devnet-old.ts .\\src\\config\\index.ts",
"copy-mainnet-config:windows": "copy .\\src\\config\\config.mainnet.ts .\\src\\config\\index.ts",
"copy-testnet-config:windows": "copy .\\src\\config\\config.testnet.ts .\\src\\config\\index.ts",
"copy-multiple-config:windows": "copy .\\src\\config\\config.multiple.ts .\\src\\config\\index.ts",
Expand Down
48 changes: 35 additions & 13 deletions src/components/Denominate/Denominate.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useState, useRef } from 'react';
import { stringIsInteger } from '@multiversx/sdk-dapp/utils/validation/stringIsInteger';
import { OverlayTrigger, Tooltip } from 'react-bootstrap';
import { useSelector } from 'react-redux';
Expand All @@ -24,19 +25,40 @@ const CompleteValueTooltip = ({
}: {
completeValue: string;
children: React.ReactNode;
}) => (
<OverlayTrigger
placement='top'
delay={{ show: 0, hide: 400 }}
overlay={(props: any) => (
<Tooltip {...props} show={props.show.toString()}>
{completeValue}
</Tooltip>
)}
>
<span>{children}</span>
</OverlayTrigger>
);
}) => {
const [show, setShow] = useState(false);
const handleOnMouseEnter = () => {
setShow(true);
};
const handleOnMouseLeave = () => {
setShow(false);
};
const ref = useRef(null);

return (
<OverlayTrigger
placement='top'
show={show}
delay={{ show: 0, hide: 400 }}
overlay={
<Tooltip
onMouseEnter={handleOnMouseEnter}
onMouseLeave={handleOnMouseLeave}
>
{completeValue}
</Tooltip>
}
>
<span
ref={ref}
onMouseEnter={handleOnMouseEnter}
onMouseLeave={handleOnMouseLeave}
>
{children}
</span>
</OverlayTrigger>
);
};

const denominateInvalid = (props: DenominateType) => {
return (
Expand Down

0 comments on commit a0e2d9b

Please sign in to comment.