Skip to content

Commit 67a4592

Browse files
ArtemArtem
Artem
authored and
Artem
committed
bugfix, styling fix, refactoring
1 parent 232dbae commit 67a4592

File tree

9 files changed

+8
-9
lines changed

9 files changed

+8
-9
lines changed
Binary file not shown.
-31.7 KB
Binary file not shown.
-31.7 KB
Binary file not shown.

packages/atlas/src/views/global/ReferralsView/ReferralsView.styles.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ export const StyledLimitedWidthWrapper = styled(FlexBox)`
5858
text-align: center;
5959
width: fit-content;
6060
margin: auto;
61-
padding-top: ${sizes(14)};
61+
padding-top: ${sizes(8)};
6262
max-width: 1368px;
6363
`

packages/atlas/src/views/global/ReferralsView/ReferralsView.types.ts

Whitespace-only changes.

packages/atlas/src/views/global/ReferralsView/sections/ReferralSteps/ReferralSteps.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const ReferralSteps = () => {
6767
}
6868
}, [minStep, selectedStep, shouldSwitch, steps.length])
6969

70-
const [titleVariant, _, __] = useSectionTextVariants()
70+
const [titleVariant] = useSectionTextVariants()
7171

7272
useEffect(() => {
7373
videoRef?.current?.load()

packages/atlas/src/views/global/ReferralsView/sections/ReferralsVideo/ReferralsVideo.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import { useSectionTextVariants } from '@/views/global/YppLandingView/sections/u
1818

1919
export const ReferralsVideo = () => {
2020
const [_, subtitleVariant, mainTitleVariant] = useSectionTextVariants()
21-
const mdMatch = useMediaMatch('md')
22-
const xsMatch = useMediaMatch('xs')
2321

2422
const videoRef = useRef<HTMLVideoElement | null>(null)
2523
const smMatch = useMediaMatch('sm')
@@ -30,7 +28,7 @@ export const ReferralsVideo = () => {
3028
}
3129
}, [])
3230
return (
33-
<FlexBox flow="column" marginTop={mdMatch ? 24 : xsMatch ? 16 : 14} gap={smMatch ? 14 : 12}>
31+
<FlexBox flow="column" gap={smMatch ? 14 : 12}>
3432
<LayoutGrid as="header">
3533
<GridItem colSpan={{ base: 12, lg: 8 }} colStart={{ lg: 3 }}>
3634
<LogosContainer>

packages/atlas/src/views/global/ReferralsView/sections/TopReferrals/TopReferrals.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,22 @@ type TopReferrerDTO = {
2424
}
2525

2626
export const TopReferrals = () => {
27-
const [titleVariant, _, __] = useSectionTextVariants()
27+
const [titleVariant] = useSectionTextVariants()
2828

2929
const { data, isLoading: isLoadingTopReferrers } = useQuery('top-referrals-fetch', () =>
3030
axiosInstance
3131
.get<TopReferrerDTO[]>(`${atlasConfig.features.ypp.youtubeSyncApiUrl}/referrers/top-referrers`)
3232
.then((res) => res.data)
3333
.catch((e) => SentryLogger.error('Top referrals fetch failed', 'TopReferralsLanding', e))
3434
)
35+
const topChannels = data?.slice(0, 5)
3536

3637
const xsMatch = useMediaMatch('xs')
3738
const mdMatch = useMediaMatch('md')
3839

3940
const { extendedChannels: topReferrersChannels } = useBasicChannels(
4041
{
41-
where: { channel: { id_in: data?.slice(0, 5).map((channel) => channel.referrerChannelId.toString()) || [] } },
42+
where: { channel: { id_in: topChannels?.map((channel) => channel.referrerChannelId.toString()) || [] } },
4243
limit: 5,
4344
},
4445
{
@@ -63,7 +64,7 @@ export const TopReferrals = () => {
6364
</Text>
6465

6566
<StyledTopReferrersGrid>
66-
{data?.slice(0, 5).map(({ referrerChannelId, totalReferredChannels, referredByTier, totalEarnings }, idx) => {
67+
{topChannels?.map(({ referrerChannelId, totalReferredChannels, referredByTier, totalEarnings }, idx) => {
6768
const channel = channelById(referrerChannelId.toString())
6869
return (
6970
<TopReferrer

packages/atlas/src/views/studio/YppDashboard/YppDashboard.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const YppDashboard: FC = () => {
2323
const headTags = useHeadTags('YouTube Partner Program')
2424
const mdMatch = useMediaMatch('md')
2525
const xsMatch = useMediaMatch('xs')
26-
const [searchParams, _] = useSearchParams()
26+
const [searchParams] = useSearchParams()
2727
const tab = searchParams.get('tab') as Tab | null
2828
const [currentVideosTab, setCurrentVideosTab] = useState(TABS.indexOf(tab || 'Dashboard'))
2929
const { trackPageView } = useSegmentAnalytics()

0 commit comments

Comments
 (0)