Skip to content

Commit

Permalink
feat: hide nose picker loader (#3338)
Browse files Browse the repository at this point in the history
  • Loading branch information
fairlighteth authored Nov 6, 2023
1 parent db8743d commit 4cc2f1a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'

import loadingCowWebp from '@cowprotocol/assets/cow-swap/cow-load.webp'
import { isInjectedWidget } from '@cowprotocol/common-utils'

import * as styledEl from './styled'

Expand All @@ -15,11 +16,12 @@ export interface CurrencyArrowSeparatorProps {

export function CurrencyArrowSeparator(props: CurrencyArrowSeparatorProps) {
const { isLoading, onSwitchTokens, withRecipient, isCollapsed = true, hasSeparatorLine, border } = props
const isInjectedWidgetMode = isInjectedWidget()

return (
<styledEl.Box withRecipient={withRecipient} isCollapsed={isCollapsed} hasSeparatorLine={hasSeparatorLine}>
<styledEl.LoadingWrapper isLoading={isLoading} border={border}>
{isLoading ? (
{!isInjectedWidgetMode && isLoading ? (
<styledEl.CowImg src={loadingCowWebp} alt="loading" />
) : (
<styledEl.ArrowDownIcon onClick={onSwitchTokens} />
Expand Down

0 comments on commit 4cc2f1a

Please sign in to comment.