diff --git a/src/components/Blog/BlogArticleCard/BlogArticleCard.style.ts b/src/components/Blog/BlogArticleCard/BlogArticleCard.style.ts index c3106e86e..fe8f0d389 100644 --- a/src/components/Blog/BlogArticleCard/BlogArticleCard.style.ts +++ b/src/components/Blog/BlogArticleCard/BlogArticleCard.style.ts @@ -23,6 +23,7 @@ export const BlogArticleCardContainer = styled(Card)(({ theme }) => ({ borderRadius: '32px', background: theme.palette.bgTertiary.main, transition: 'background-color 250ms', + boxShadow: theme.shadows[2], [theme.breakpoints.up('sm' as Breakpoint)]: { minWidth: 250, width: 416, diff --git a/src/components/Blog/BlogCarousel/BlogCarousel.style.ts b/src/components/Blog/BlogCarousel/BlogCarousel.style.ts index dc2f9a8b0..575bc9e5d 100644 --- a/src/components/Blog/BlogCarousel/BlogCarousel.style.ts +++ b/src/components/Blog/BlogCarousel/BlogCarousel.style.ts @@ -6,18 +6,22 @@ export const BlogCarouselContainer = styled(Box)(({ theme }) => ({ backgroundColor: theme.palette.bgSecondary.main, borderRadius: '32px', padding: theme.spacing(2), + paddingBottom: theme.spacing(1.25), margin: theme.spacing(6, 2, 0), boxShadow: theme.shadows[1], [theme.breakpoints.up('sm' as Breakpoint)]: { margin: theme.spacing(2, 8, 0), padding: theme.spacing(3), + paddingBottom: theme.spacing(2.25), }, [theme.breakpoints.up('md' as Breakpoint)]: { padding: theme.spacing(4), + paddingBottom: theme.spacing(3.25), margin: theme.spacing(12, 8, 0), }, [theme.breakpoints.up('lg' as Breakpoint)]: { padding: theme.spacing(6), + paddingBottom: theme.spacing(5.25), }, [theme.breakpoints.up('xl' as Breakpoint)]: { margin: `${theme.spacing(12, 'auto', 0)}`, diff --git a/src/components/Blog/BlogCarousel/CarouselContainer.style.ts b/src/components/Blog/BlogCarousel/CarouselContainer.style.ts index 110a91cae..09f64de19 100644 --- a/src/components/Blog/BlogCarousel/CarouselContainer.style.ts +++ b/src/components/Blog/BlogCarousel/CarouselContainer.style.ts @@ -1,4 +1,4 @@ -import { IconButtonTertiary } from '@/components/IconButton.style'; +import { IconButtonSecondary } from '@/components/IconButton.style'; import type { BoxProps, Breakpoint, @@ -11,22 +11,24 @@ export interface CarouselContainerBoxProps extends Omit { styles?: CSSObject; } -export const CarouselContainerBox = styled(Box)( - ({ theme }) => ({ - display: 'flex', - gap: theme.spacing(4), - marginTop: theme.spacing(3), - overflow: 'auto', - width: '100%', - overflowY: 'hidden', - scrollSnapType: 'x mandatory', - '& > *': { - flexShrink: 0, - scrollSnapAlign: 'center', - }, - '::-webkit-scrollbar': { display: 'none' }, - }), -); +export const CarouselContainerBox = styled(Box, { + shouldForwardProp: (prop) => prop !== 'styles', +})(({ theme, styles }) => ({ + display: 'flex', + gap: theme.spacing(4), + marginTop: theme.spacing(3), + overflow: 'auto', + width: '100%', + overflowY: 'hidden', + scrollSnapType: 'x mandatory', + paddingBottom: theme.spacing(0.75), + '& > *': { + flexShrink: 0, + scrollSnapAlign: 'center', + }, + '::-webkit-scrollbar': { display: 'none' }, + ...styles, +})); export const CarouselHeader = styled(Box, { shouldForwardProp: (prop) => prop !== 'styles', @@ -63,7 +65,7 @@ export const CarouselNavigationContainer = styled(Box, { ], })); -export const CarouselNavigationButton = styled(IconButtonTertiary, { +export const CarouselNavigationButton = styled(IconButtonSecondary, { shouldForwardProp: (prop) => prop !== 'styles', })(({ theme }) => ({ width: 40, diff --git a/src/components/Blog/BlogCarousel/CarouselContainer.tsx b/src/components/Blog/BlogCarousel/CarouselContainer.tsx index 2e9fb45fd..a3696e9fc 100644 --- a/src/components/Blog/BlogCarousel/CarouselContainer.tsx +++ b/src/components/Blog/BlogCarousel/CarouselContainer.tsx @@ -1,7 +1,6 @@ -import ArrowBackIcon from '@mui/icons-material/ArrowBack'; -import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; +import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; +import ChevronRightIcon from '@mui/icons-material/ChevronRight'; import { Box, useTheme, type CSSObject } from '@mui/material'; - import type { ReactNode } from 'react'; import { useCallback, useRef } from 'react'; import IconHeader from 'src/components/ProfilePage/Common/IconHeader'; @@ -81,6 +80,13 @@ export const CarouselContainer = ({ ({ + [theme.breakpoints.down('sm')]: { + '.icon-header-title': { + display: 'none', + }, + }, + })} /> )} @@ -91,14 +97,14 @@ export const CarouselContainer = ({ aria-label="previous" onClick={() => handleChange('prev')} > - + handleChange('next')} > - + diff --git a/src/components/Leaderboard/Leaderboard.style.ts b/src/components/Leaderboard/Leaderboard.style.ts index ca4653111..dae2c4b1d 100644 --- a/src/components/Leaderboard/Leaderboard.style.ts +++ b/src/components/Leaderboard/Leaderboard.style.ts @@ -18,7 +18,6 @@ export const LeaderboardHeader = styled(Box)(({ theme }) => ({ flexDirection: 'column-reverse', gap: theme.spacing(1.5), alignItems: 'flex-start', - paddingLeft: theme.spacing(3), [theme.breakpoints.up('sm' as Breakpoint)]: { gap: 0, justifyContent: 'space-between', diff --git a/src/components/Leaderboard/Leaderboard.tsx b/src/components/Leaderboard/Leaderboard.tsx index 3d3f1b933..6d26bdd03 100644 --- a/src/components/Leaderboard/Leaderboard.tsx +++ b/src/components/Leaderboard/Leaderboard.tsx @@ -1,14 +1,18 @@ 'use client'; -import { Typography } from '@mui/material'; +import type { Breakpoint } from '@mui/material'; +import { Typography, useTheme } from '@mui/material'; import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { useAccount } from '@lifi/wallet-management'; +import { Box } from '@mui/material'; +import useClient from 'src/hooks/useClient'; import type { LeaderboardEntryData } from '../../hooks/useLeaderboard'; import { useLeaderboardList, useLeaderboardUser, } from '../../hooks/useLeaderboard'; +import IconHeader from '../ProfilePage/Common/IconHeader'; import { Pagination } from '../ProfilePage/Common/Pagination'; import { PageContainer } from '../ProfilePage/ProfilePage.style'; import { @@ -22,9 +26,6 @@ import { import { LeaderboardEntry } from './LeaderboardEntry'; import { LeaderboardEntrySkeleton } from './LeaderboardEntrySkeleton'; import { LeaderboardUserEntry } from './LeaderboardUserEntry'; -import IconHeader from '../ProfilePage/Common/IconHeader'; -import useClient from 'src/hooks/useClient'; -import { Box } from '@mui/material'; export const LEADERBOARD_LENGTH = 25; @@ -36,7 +37,7 @@ export const Leaderboard = ({ page: defaultPage }: { page: number }) => { const { account } = useAccount(); const { t } = useTranslation(); - + const theme = useTheme(); const isClient = useClient(); const { data: leaderboardData, meta } = useLeaderboardList( @@ -70,6 +71,11 @@ export const Leaderboard = ({ page: defaultPage }: { page: number }) => { )} diff --git a/src/components/Leaderboard/LeaderboardEntry.style.ts b/src/components/Leaderboard/LeaderboardEntry.style.ts index 2a78471ca..1821f66a8 100644 --- a/src/components/Leaderboard/LeaderboardEntry.style.ts +++ b/src/components/Leaderboard/LeaderboardEntry.style.ts @@ -79,6 +79,11 @@ export const LeaderboardEntryWrapper = styled(Box, { right: -12, }, }, + ':last-of-type': { + borderBottomRightRadius: '16px', + borderBottomLeftRadius: '16px', + backgroundColor: 'red', + }, }, }, ], diff --git a/src/components/Navbar/WalletButtons.tsx b/src/components/Navbar/WalletButtons.tsx index 104289b15..df612a8fd 100644 --- a/src/components/Navbar/WalletButtons.tsx +++ b/src/components/Navbar/WalletButtons.tsx @@ -1,4 +1,6 @@ 'use client'; +import ConnectButton from '@/components/Navbar/ConnectButton'; +import { useWalletAddressImg } from '@/hooks/useAddressImg'; import { useChains } from '@/hooks/useChains'; import { useMenuStore } from '@/stores/menu'; import { getAddressLabel } from '@/utils/getAddressLabel'; @@ -22,7 +24,6 @@ import { mainnet } from 'wagmi/chains'; import { JUMPER_WASH_PATH } from '../../const/urls'; import { XPIcon } from '../illustrations/XPIcon'; import { - ConnectButtonLabel, ImageWalletMenuButton, SkeletonWalletMenuButton, WalletLabel, @@ -31,8 +32,6 @@ import { WalletMgmtChainAvatar, WalletMgmtWalletAvatar, } from './WalletButton.style'; -import { useWalletAddressImg } from '@/hooks/useAddressImg'; -import ConnectButton from '@/components/Navbar/ConnectButton'; export const WalletButtons = () => { const { chains } = useChains(); @@ -108,7 +107,7 @@ export const WalletButtons = () => { {points ? t('format.decimal2Digit', { value: points }) : 0} )} - + )} ({ paddingRight: '6px', paddingLeft: '6px', borderRadius: '32px', + width: 'fit-content', })); export const IconHeaderTitle = styled(Typography)(({ theme }) => ({ diff --git a/src/components/ProfilePage/Common/IconHeader.tsx b/src/components/ProfilePage/Common/IconHeader.tsx index 69be085c1..c22561e46 100644 --- a/src/components/ProfilePage/Common/IconHeader.tsx +++ b/src/components/ProfilePage/Common/IconHeader.tsx @@ -1,5 +1,6 @@ 'use client'; +import type { SxProps, Theme } from '@mui/material'; import { Tooltip, useTheme } from '@mui/material'; import { useTranslation } from 'react-i18next'; import { StyledInfoIcon } from '../../TooltipInfo/TooltipInfo.style'; @@ -9,16 +10,19 @@ export interface IconHeaderProps { tooltipKey: string; title: string; icon?: React.ReactNode; + sx?: SxProps; } -const IconHeader = ({ tooltipKey, title, icon }: IconHeaderProps) => { +const IconHeader = ({ tooltipKey, title, icon, sx }: IconHeaderProps) => { const { t } = useTranslation(); const theme = useTheme(); return ( - + {icon} - {title} + + {title} + ({ width: '100%', lineHeight: '18px', height: 40, - color: theme.palette.text.primary, + color: + theme.palette.mode === 'light' + ? theme.palette.primary.main + : theme.palette.text.primary, })); export const LeaderboardUserPositionButton = styled(ButtonTransparent)( ({ theme }) => ({ padding: theme.spacing(0, 1), + textDecoration: 'none', + position: 'relative', marginTop: theme.spacing(0.5), height: 64, background: 'transparent', diff --git a/src/components/ProfilePage/LeaderboardCard/LeaderboardCard.tsx b/src/components/ProfilePage/LeaderboardCard/LeaderboardCard.tsx index b9f20c54d..fe1818658 100644 --- a/src/components/ProfilePage/LeaderboardCard/LeaderboardCard.tsx +++ b/src/components/ProfilePage/LeaderboardCard/LeaderboardCard.tsx @@ -1,10 +1,10 @@ import { Box } from '@mui/material'; -import Link from 'next/link'; import { useTranslation } from 'react-i18next'; import { RankIcon } from 'src/components/illustrations/IconRANK'; import { LEADERBOARD_LENGTH } from 'src/components/Leaderboard/Leaderboard'; import type { LeaderboardEntryData } from '../../../hooks/useLeaderboard'; import { useLeaderboardUser } from '../../../hooks/useLeaderboard'; +import IconHeader from '../Common/IconHeader'; import { CardButton, CardButtonContainer, @@ -13,7 +13,6 @@ import { RankContainer, RankContentContainer, } from './LeaderboardCard.style'; -import IconHeader from '../Common/IconHeader'; export const LeaderboardCard = ({ address }: { address?: string }) => { const { data: leaderboardUserData }: { data: LeaderboardEntryData } = @@ -35,19 +34,17 @@ export const LeaderboardCard = ({ address }: { address?: string }) => { {position ? ( - - - - {leaderboardUserData?.position - ? t('format.decimal2Digit', { value: position }) - : 'N/A'} - - - + + {leaderboardUserData?.position + ? t('format.decimal2Digit', { value: position }) + : 'N/A'} + + ) : ( N/A )} diff --git a/src/components/ProfilePage/LevelBox/PointsBox.tsx b/src/components/ProfilePage/LevelBox/PointsBox.tsx index 21c04f76b..67004a417 100644 --- a/src/components/ProfilePage/LevelBox/PointsBox.tsx +++ b/src/components/ProfilePage/LevelBox/PointsBox.tsx @@ -1,11 +1,11 @@ 'use client'; -import { Box } from '@mui/material'; +import { Box, useTheme } from '@mui/material'; import { useTranslation } from 'react-i18next'; import { XPIcon } from 'src/components/illustrations/XPIcon'; -import { PointsDisplay } from './PointsDisplay'; -import IconHeader from '../Common/IconHeader'; import useClient from 'src/hooks/useClient'; +import IconHeader from '../Common/IconHeader'; +import { PointsDisplay } from './PointsDisplay'; interface PointsBoxProps { points?: number; @@ -13,7 +13,7 @@ interface PointsBoxProps { export const PointsBox = ({ points }: PointsBoxProps) => { const { t } = useTranslation(); - + const theme = useTheme(); const isClient = useClient(); return ( @@ -23,6 +23,14 @@ export const PointsBox = ({ points }: PointsBoxProps) => { tooltipKey="profile_page.pointsInfo" title={`Updated: ${t('format.date', { value: new Date() })}`} icon={} + sx={{ + [theme.breakpoints.down('sm')]: { + // display: 'none', + '.icon-header-title': { + display: 'none', + }, + }, + }} /> )} diff --git a/src/components/ProfilePage/LevelBox/ProgressionBar.style.ts b/src/components/ProfilePage/LevelBox/ProgressionBar.style.ts index e90833979..f511b3c72 100644 --- a/src/components/ProfilePage/LevelBox/ProgressionBar.style.ts +++ b/src/components/ProfilePage/LevelBox/ProgressionBar.style.ts @@ -47,7 +47,7 @@ export const ProgressionChart = styled(Box, { position: 'relative', overflow: 'hidden', borderRadius: '12px', - height: '16px', + height: 8, width: '100%', display: 'flex', variants: [ diff --git a/src/components/ProfilePage/ProfilePage.tsx b/src/components/ProfilePage/ProfilePage.tsx index 25fac1e4b..34aa159f4 100644 --- a/src/components/ProfilePage/ProfilePage.tsx +++ b/src/components/ProfilePage/ProfilePage.tsx @@ -1,6 +1,5 @@ 'use client'; import { useLoyaltyPass } from '@/hooks/useLoyaltyPass'; -import { useAccount } from '@lifi/wallet-management'; import { useContext } from 'react'; import { useMerklRewardsOnCampaigns } from 'src/hooks/useMerklRewardsOnCampaigns'; import { useTraits } from 'src/hooks/useTraits'; @@ -21,7 +20,6 @@ import { ProfileContext } from '@/providers/ProfileProvider'; import { CampaignBanner } from './CampaignBanner/CampaignBanner'; export const ProfilePage = () => { - const { account } = useAccount(); const { walletAddress, isPublic } = useContext(ProfileContext); const { isLoading, points, pdas } = useLoyaltyPass(walletAddress); const { traits } = useTraits(); diff --git a/src/components/ProfilePage/QuestCard/QuestCard.tsx b/src/components/ProfilePage/QuestCard/QuestCard.tsx index da6f684b7..688a1dcad 100644 --- a/src/components/ProfilePage/QuestCard/QuestCard.tsx +++ b/src/components/ProfilePage/QuestCard/QuestCard.tsx @@ -174,6 +174,7 @@ export const QuestCard = ({ data }: QuestCardDataProps) => { style={{ marginLeft: i === 0 ? '' : '-8px', zIndex: 100 - i, + borderRadius: '50%', }} alt={elem.name} width="32" diff --git a/src/components/ProfilePage/QuestsOverview/QuestsOverview.style.ts b/src/components/ProfilePage/QuestsOverview/QuestsOverview.style.ts index 08798f895..ff6c64c15 100644 --- a/src/components/ProfilePage/QuestsOverview/QuestsOverview.style.ts +++ b/src/components/ProfilePage/QuestsOverview/QuestsOverview.style.ts @@ -10,19 +10,21 @@ export const QuestsOverviewContainer = styled(Box)(({ theme }) => ({ gridRowGap: theme.spacing(2), backgroundColor: theme.palette.bgSecondary.main, borderRadius: '32px', - paddingY: theme.spacing(2), - paddingX: theme.spacing(1), + padding: theme.spacing(2, 1), + paddingBottom: theme.spacing(1.25), boxShadow: theme.shadows[1], marginTop: theme.spacing(4), [theme.breakpoints.up('sm' as Breakpoint)]: { - padding: theme.spacing(3), + padding: theme.spacing(4, 3, 3.25), }, })); export const QuestsOverviewTitle = styled(SectionTitle)(({ theme }) => ({ gridColumn: '1 / -1', - marginBottom: '8px', + marginBottom: theme.spacing(1), + marginTop: theme.spacing(1.5), [theme.breakpoints.up('sm' as Breakpoint)]: { + marginTop: 0, marginBottom: '8px', }, })); diff --git a/src/components/illustrations/XPIcon.tsx b/src/components/illustrations/XPIcon.tsx index 5784cffbf..d070dc161 100644 --- a/src/components/illustrations/XPIcon.tsx +++ b/src/components/illustrations/XPIcon.tsx @@ -1,4 +1,12 @@ -export const XPIcon = ({ colorFill }: { colorFill?: string }) => { +import type { SVGProps } from 'react'; + +export const XPIcon = ({ + colorFill, + props, +}: { + colorFill?: string; + props?: SVGProps; +}) => { const color = colorFill ?? '#31007A'; return ( @@ -8,6 +16,7 @@ export const XPIcon = ({ colorFill }: { colorFill?: string }) => { viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" + {...props} >