Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { ReactComponent as FarmingIcon } from 'assets/svg/earn/ic_farming.svg'
import { ReactComponent as KemIcon } from 'assets/svg/kyber/kem.svg'
import NavGroup from 'components/Header/groups/NavGroup'
import { DropdownTextAnchor, StyledNavLink } from 'components/Header/styleds'
import { BetaLabel } from 'components/Menu'
import { APP_PATHS } from 'constants/index'
import { FilterTag } from 'pages/Earns/PoolExplorer/Filter'
import { MEDIA_WIDTHS } from 'theme'
Expand Down Expand Up @@ -85,10 +84,7 @@ const EarnNavGroup = () => {
>
<Flex sx={{ gap: '12px' }} alignItems="center">
<FarmingIcon width={16} height={16} />
<Flex sx={{ gap: '2px' }}>
{t`Farming Pools`}
<BetaLabel>{t`BETA`}</BetaLabel>
</Flex>
<Flex sx={{ gap: '2px' }}>{t`Farming Pools`}</Flex>
</Flex>
</StyledNavLink>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const TokenLogoWithChain = ({
position: 'absolute',
top: 0,
right: '-4px',
borderRadius: '50%',
...chainLogoStyle,
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function TableContent({
const { account } = useActiveWeb3React()
const toggleWalletModal = useWalletModalToggle()
const theme = useTheme()
const upToLarge = useMedia(`(max-width: ${MEDIA_WIDTHS.upToLarge}px)`)
const upToCustomLarge = useMedia(`(max-width: ${1300}px)`)
const upToSmall = useMedia(`(max-width: ${MEDIA_WIDTHS.upToSmall}px)`)

const [positionThatClaimingFees, setPositionThatClaimingFees] = useState<ParsedPosition | null>(null)
Expand Down Expand Up @@ -416,7 +416,7 @@ export default function TableContent({
</PositionOverview>

{/* Actions for Tablet */}
{upToLarge && !isUnfinalized && <PositionActionWrapper>{actions}</PositionActionWrapper>}
{upToCustomLarge && !isUnfinalized && <PositionActionWrapper>{actions}</PositionActionWrapper>}

{/* Value info */}
<PositionValueWrapper>
Expand Down Expand Up @@ -511,7 +511,7 @@ export default function TableContent({
</PositionValueWrapper>

{/* Unclaimed fees info */}
<PositionValueWrapper align={upToLarge ? 'flex-end' : ''}>
<PositionValueWrapper align={upToCustomLarge ? 'flex-end' : ''}>
<PositionValueLabel>{t`Unclaimed Fee`}</PositionValueLabel>

{isUnfinalized ? (
Expand Down Expand Up @@ -541,7 +541,7 @@ export default function TableContent({
</PositionValueWrapper>

{/* Unclaimed rewards info */}
<PositionValueWrapper align={!upToLarge ? 'center' : ''}>
<PositionValueWrapper align={!upToCustomLarge ? 'center' : ''}>
<PositionValueLabel>{t`Unclaimed rewards`}</PositionValueLabel>
{isUnfinalized ? (
<PositionSkeleton width={80} height={19} text={t`Finalizing...`} />
Expand Down Expand Up @@ -583,7 +583,7 @@ export default function TableContent({
)}
</PositionValueWrapper>

{!upToLarge && <div />}
{!upToCustomLarge && <div />}

{/* Balance info */}
<PositionValueWrapper align={upToSmall ? 'flex-end' : ''}>
Expand Down Expand Up @@ -611,8 +611,8 @@ export default function TableContent({
</PositionValueWrapper>

{/* Price range info */}
<PositionValueWrapper align={upToLarge ? 'flex-end' : ''}>
{upToLarge ? (
<PositionValueWrapper align={upToCustomLarge ? 'flex-end' : ''}>
{upToCustomLarge ? (
isUnfinalized ? null : (
<PriceRange
minPrice={priceRange.min}
Expand Down Expand Up @@ -640,7 +640,7 @@ export default function TableContent({
</PositionValueWrapper>

{/* Actions info */}
{!upToLarge && (
{!upToCustomLarge && (
<PositionValueWrapper align="flex-end">
{isUnfinalized ? <PositionSkeleton width={80} height={19} text={t`Finalizing...`} /> : actions}
</PositionValueWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const POSITIONS_TABLE_LIMIT = 10
const UserPositions = () => {
const theme = useTheme()
const navigate = useNavigate()
const upToLarge = useMedia(`(max-width: ${MEDIA_WIDTHS.upToLarge}px)`)
const upToCustomLarge = useMedia(`(max-width: ${1300}px)`)
const upToSmall = useMedia(`(max-width: ${MEDIA_WIDTHS.upToSmall}px)`)
const { account } = useActiveWeb3React()
const { filters, updateFilters } = useFilter()
Expand Down Expand Up @@ -382,7 +382,7 @@ const UserPositions = () => {

<PositionTableWrapper>
<ContentWrapper>
{!upToLarge && paginatedPositions && paginatedPositions.length > 0 && (
{!upToCustomLarge && paginatedPositions && paginatedPositions.length > 0 && (
<PositionTableHeader>
<PositionTableHeaderItem>{t`Position`}</PositionTableHeaderItem>

Expand Down Expand Up @@ -437,7 +437,7 @@ const UserPositions = () => {
</Trans>
</PositionTableHeaderFlexItem>

{!upToLarge && <div />}
{!upToCustomLarge && <div />}

<PositionTableHeaderItem>{t`Balance`}</PositionTableHeaderItem>

Expand Down
22 changes: 11 additions & 11 deletions apps/kyberswap-interface/src/pages/Earns/UserPositions/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { PoolPageWrapper, TableHeader, TableWrapper } from 'pages/Earns/PoolExpl
export const PositionPageWrapper = styled(PoolPageWrapper)`
padding: 24px 6rem 62px;

${({ theme }) => theme.mediaWidth.upToLarge`
@media (max-width: 1300px) {
padding: 24px 6rem 60px;
`}
}

${({ theme }) => theme.mediaWidth.upToSmall`
padding: 24px 16px 100px;
Expand All @@ -35,14 +35,14 @@ export const PositionRow = styled(Link)`
text-decoration: none;
color: inherit !important;

${({ theme }) => theme.mediaWidth.upToLarge`
@media (max-width: 1300px) {
justify-content: flex-start;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 1fr 1fr;
border-radius: 20px;
background: ${rgba(theme.background, 0.8)};
background: ${({ theme }) => rgba(theme.background, 0.8)};
margin-bottom: 16px;
`}
}

${({ theme }) => theme.mediaWidth.upToSmall`
display: flex;
Expand All @@ -68,9 +68,9 @@ export const PositionOverview = styled.div`
flex-direction: column;
gap: 8px;

${({ theme }) => theme.mediaWidth.upToLarge`
@media (max-width: 1300px) {
grid-column: span 2;
`}
}
`

export const ImageContainer = styled.div`
Expand Down Expand Up @@ -160,9 +160,9 @@ export const PositionValueLabel = styled.p`
top: 1px;
display: none;

${({ theme }) => theme.mediaWidth.upToLarge`
@media (max-width: 1300px) {
display: block;
`}
}

${({ theme }) => theme.mediaWidth.upToSmall`
font-size: 16px;
Expand Down Expand Up @@ -354,10 +354,10 @@ export const PositionTableHeaderFlexItem = styled.div`
export const PositionTableWrapper = styled(TableWrapper)`
overflow: hidden;

${({ theme }) => theme.mediaWidth.upToLarge`
@media (max-width: 1300px) {
background: transparent;
margin: 0;
`}
}
`

export const PriceRangeWrapper = styled.div<{ outOfRange: boolean }>`
Expand Down
5 changes: 3 additions & 2 deletions apps/kyberswap-interface/src/theme/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import styled, {
css,
} from 'styled-components'

import { Colors, colors } from './color'
import { Colors, colors } from 'theme/color'

export * from './components'
export * from 'theme/components'

export const MEDIA_WIDTHS = {
upToXXSmall: 420,
Expand Down Expand Up @@ -223,6 +223,7 @@ export const ThemedGlobalStyle = createGlobalStyle`

input[type=number] {
-moz-appearance: textfield; /* Firefox */
appearance: textfield;
}

.tv-lightweight-charts{
Expand Down
Loading