diff --git a/components/modals/SwapIntroModal.tsx b/components/modals/SwapIntroModal.tsx index 77498561..b5df01c0 100644 --- a/components/modals/SwapIntroModal.tsx +++ b/components/modals/SwapIntroModal.tsx @@ -1,28 +1,21 @@ +import Button from '@components/shared/Button' +import { CheckCircleIcon } from '@heroicons/react/20/solid' import { ModalProps } from '../../types/modal' import Modal from '../shared/Modal' -// import { useTranslation } from 'next-i18next' +import { useTranslation } from 'next-i18next' const SwapIntroModal = ({ isOpen, onClose }: ModalProps) => { - // const { t } = useTranslation('common') + const { t } = useTranslation(['common', 'swap']) return ( -
- {/* next */} -
- Margin Swap -
-
+

{t('swap:margin-swap')}

-
-
+
+
{ - - - - - - - - - - { > + + + + + + + + + + {/* { d="M17.0556 23.9546L22.7212 20.6482C23.1841 20.3781 23.5955 19.9898 23.9282 19.5087C24.2609 19.0275 24.5073 18.4646 24.6513 17.8571C24.6881 17.7018 24.7254 17.5444 24.7632 17.385L24.7238 17.4074V17.4093L16.7455 22.0644C16.6093 22.1439 16.4578 22.1751 16.3081 22.1545C16.1584 22.1339 16.0162 22.0622 15.8974 21.9476C15.7786 21.833 15.6879 21.6798 15.6352 21.5052C15.5826 21.3306 15.5701 21.1413 15.5993 20.9584C15.7073 20.2801 15.9421 19.6425 16.2847 19.0964C16.6273 18.5504 17.0684 18.1109 17.5727 17.8133L24.3386 13.8194C24.7939 13.5504 25.1989 13.1668 25.5275 12.6932C25.8561 12.2195 26.1013 11.6662 26.2472 11.0686C26.2946 10.8748 26.3382 10.6943 26.3737 10.5439L26.3435 10.5608L17.2554 15.9259C16.4343 16.4106 15.7162 17.1261 15.1582 18.0151C14.6003 18.9042 14.2181 19.9422 14.042 21.0465C13.9653 21.5273 13.9979 22.025 14.1363 22.4842C14.2746 22.9435 14.5133 23.3462 14.8256 23.6476C15.138 23.949 15.5118 24.1373 15.9055 24.1915C16.2992 24.2457 16.6974 24.1637 17.0556 23.9546Z" fill="#23C1AA" > - - */} + {/* { d="M12.8063 10.8231H12.0833C11.9929 10.8231 11.9195 10.9058 11.9195 11.0074V11.5677C11.9195 11.6698 11.8834 11.7678 11.8192 11.8401L11.7731 11.8918C11.7089 11.964 11.6217 12.0044 11.5309 12.0044H8.4687C8.37792 12.0044 8.2907 11.964 8.22644 11.8918L8.18043 11.8401C8.11617 11.7678 8.08009 11.6698 8.08009 11.5677V11.0074C8.08009 10.9058 8.00672 10.8231 7.91611 10.8231H7.19327C7.10284 10.8231 7.0293 10.9058 7.0293 11.0074V11.8201C7.0293 11.922 7.10284 12.0044 7.19327 12.0044H7.73763C7.82841 12.0044 7.91559 12.045 7.97989 12.1172C8.04418 12.1895 8.08009 12.2875 8.08009 12.3896V12.9841C8.08009 13.095 8.16076 13.1857 8.25944 13.1857H8.25992H11.7397H11.74C11.8388 13.1857 11.9195 13.095 11.9195 12.9841V12.3896C11.9195 12.2875 11.9554 12.1895 12.0197 12.1172C12.084 12.045 12.1712 12.0044 12.262 12.0044H12.8063C12.8967 12.0044 12.9703 11.922 12.9703 11.8201V11.0074C12.9703 10.9058 12.8967 10.8231 12.8063 10.8231Z" fill="inherit" > - + */} { - { > - + */} { {/* */} - { - - */} + {/* { - + */} {
- -
-
    -
  • - Swap your Mango assets through dozens of Solana DEXs including Orca, - Lifinity, and more. -
  • -
  • - Adjust your settings to control slippage or turn off margin -
  • -
  • - Utilize the slider to adjust leverage and borrow against your - collateral -
  • +
    +
      + + +
    +
    ) } export default SwapIntroModal + +const ListItem = ({ desc }: { desc: string }) => { + return ( +
  • + + {desc} +
  • + ) +} diff --git a/public/locales/en/swap.json b/public/locales/en/swap.json index 4cf427ff..1e2997af 100644 --- a/public/locales/en/swap.json +++ b/public/locales/en/swap.json @@ -8,6 +8,7 @@ "input-reduce-only-warning": "{{symbol}} is in reduce only mode. You can swap your balance to another token", "insufficient-balance": "Insufficient {{symbol}} Balance", "insufficient-collateral": "Insufficient Collateral", + "margin-swap": "Margin Swap", "max-slippage": "Max Slippage", "maximum-cost": "Maximum Cost", "minimum-received": "Minimum Received", @@ -24,6 +25,9 @@ "show-fees": "Show Fees", "slippage": "Slippage", "swap-history": "Swap History", + "swap-into-1": "Borrow against your collateral and swap with up to 5x leverage.", + "swap-into-2": "Swap your Mango assets via the top DEXs on Solana and get the best possible price.", + "swap-into-3": "The sky's the limit. Long or short any token vs any other.", "swap-route": "Swap Route", "tooltip-borrow-balance": "You'll use your {{balance}} {{token}} balance and borrow {{borrowAmount}} {{token}} to execute this swap. The current {{token}} variable borrow rate is {{rate}}%", "tooltip-borrow-no-balance": "You'll borrow {{borrowAmount}} {{token}} to execute this swap. The current {{token}} variable borrow rate is {{rate}}%", diff --git a/public/locales/es/swap.json b/public/locales/es/swap.json index 4cf427ff..1e2997af 100644 --- a/public/locales/es/swap.json +++ b/public/locales/es/swap.json @@ -8,6 +8,7 @@ "input-reduce-only-warning": "{{symbol}} is in reduce only mode. You can swap your balance to another token", "insufficient-balance": "Insufficient {{symbol}} Balance", "insufficient-collateral": "Insufficient Collateral", + "margin-swap": "Margin Swap", "max-slippage": "Max Slippage", "maximum-cost": "Maximum Cost", "minimum-received": "Minimum Received", @@ -24,6 +25,9 @@ "show-fees": "Show Fees", "slippage": "Slippage", "swap-history": "Swap History", + "swap-into-1": "Borrow against your collateral and swap with up to 5x leverage.", + "swap-into-2": "Swap your Mango assets via the top DEXs on Solana and get the best possible price.", + "swap-into-3": "The sky's the limit. Long or short any token vs any other.", "swap-route": "Swap Route", "tooltip-borrow-balance": "You'll use your {{balance}} {{token}} balance and borrow {{borrowAmount}} {{token}} to execute this swap. The current {{token}} variable borrow rate is {{rate}}%", "tooltip-borrow-no-balance": "You'll borrow {{borrowAmount}} {{token}} to execute this swap. The current {{token}} variable borrow rate is {{rate}}%", diff --git a/public/locales/ru/swap.json b/public/locales/ru/swap.json index 4cf427ff..1e2997af 100644 --- a/public/locales/ru/swap.json +++ b/public/locales/ru/swap.json @@ -8,6 +8,7 @@ "input-reduce-only-warning": "{{symbol}} is in reduce only mode. You can swap your balance to another token", "insufficient-balance": "Insufficient {{symbol}} Balance", "insufficient-collateral": "Insufficient Collateral", + "margin-swap": "Margin Swap", "max-slippage": "Max Slippage", "maximum-cost": "Maximum Cost", "minimum-received": "Minimum Received", @@ -24,6 +25,9 @@ "show-fees": "Show Fees", "slippage": "Slippage", "swap-history": "Swap History", + "swap-into-1": "Borrow against your collateral and swap with up to 5x leverage.", + "swap-into-2": "Swap your Mango assets via the top DEXs on Solana and get the best possible price.", + "swap-into-3": "The sky's the limit. Long or short any token vs any other.", "swap-route": "Swap Route", "tooltip-borrow-balance": "You'll use your {{balance}} {{token}} balance and borrow {{borrowAmount}} {{token}} to execute this swap. The current {{token}} variable borrow rate is {{rate}}%", "tooltip-borrow-no-balance": "You'll borrow {{borrowAmount}} {{token}} to execute this swap. The current {{token}} variable borrow rate is {{rate}}%", diff --git a/public/locales/zh/swap.json b/public/locales/zh/swap.json index 4cf427ff..1e2997af 100644 --- a/public/locales/zh/swap.json +++ b/public/locales/zh/swap.json @@ -8,6 +8,7 @@ "input-reduce-only-warning": "{{symbol}} is in reduce only mode. You can swap your balance to another token", "insufficient-balance": "Insufficient {{symbol}} Balance", "insufficient-collateral": "Insufficient Collateral", + "margin-swap": "Margin Swap", "max-slippage": "Max Slippage", "maximum-cost": "Maximum Cost", "minimum-received": "Minimum Received", @@ -24,6 +25,9 @@ "show-fees": "Show Fees", "slippage": "Slippage", "swap-history": "Swap History", + "swap-into-1": "Borrow against your collateral and swap with up to 5x leverage.", + "swap-into-2": "Swap your Mango assets via the top DEXs on Solana and get the best possible price.", + "swap-into-3": "The sky's the limit. Long or short any token vs any other.", "swap-route": "Swap Route", "tooltip-borrow-balance": "You'll use your {{balance}} {{token}} balance and borrow {{borrowAmount}} {{token}} to execute this swap. The current {{token}} variable borrow rate is {{rate}}%", "tooltip-borrow-no-balance": "You'll borrow {{borrowAmount}} {{token}} to execute this swap. The current {{token}} variable borrow rate is {{rate}}%", diff --git a/public/locales/zh_tw/swap.json b/public/locales/zh_tw/swap.json index 4cf427ff..1e2997af 100644 --- a/public/locales/zh_tw/swap.json +++ b/public/locales/zh_tw/swap.json @@ -8,6 +8,7 @@ "input-reduce-only-warning": "{{symbol}} is in reduce only mode. You can swap your balance to another token", "insufficient-balance": "Insufficient {{symbol}} Balance", "insufficient-collateral": "Insufficient Collateral", + "margin-swap": "Margin Swap", "max-slippage": "Max Slippage", "maximum-cost": "Maximum Cost", "minimum-received": "Minimum Received", @@ -24,6 +25,9 @@ "show-fees": "Show Fees", "slippage": "Slippage", "swap-history": "Swap History", + "swap-into-1": "Borrow against your collateral and swap with up to 5x leverage.", + "swap-into-2": "Swap your Mango assets via the top DEXs on Solana and get the best possible price.", + "swap-into-3": "The sky's the limit. Long or short any token vs any other.", "swap-route": "Swap Route", "tooltip-borrow-balance": "You'll use your {{balance}} {{token}} balance and borrow {{borrowAmount}} {{token}} to execute this swap. The current {{token}} variable borrow rate is {{rate}}%", "tooltip-borrow-no-balance": "You'll borrow {{borrowAmount}} {{token}} to execute this swap. The current {{token}} variable borrow rate is {{rate}}%",