@@ -27,7 +27,10 @@ import { Timer } from '@components/popups/Timer'
2727import { PowerUp } from '@components/popups/PowerUp'
2828import { NameTT } from '@components/popups/NameTT'
2929import { TimeStamp } from '@components/popups/TimeStamps'
30- import { BackgroundCard } from '@components/popups/BackgroundCard'
30+ import {
31+ BackgroundCard ,
32+ createFullBleedSurfaceStyle ,
33+ } from '@components/popups/BackgroundCard'
3134import { useAnalytics } from '@hooks/useAnalytics'
3235import { useGetAvailable } from '@hooks/useGetAvailable'
3336import { parseQuestConditions } from '@utils/parseConditions'
@@ -599,27 +602,11 @@ const RewardInfo = ({ with_ar, ...quest }) => {
599602 * @param {{
600603 * quest: Omit<import('@rm /types').Quest, 'key'>
601604 * visuals?: ReturnType<ReturnType<typeof usePokemonBackgroundVisuals>>
602- * hasBackground?: boolean
603605 * }} props
604606 * @returns
605607 */
606- const QuestRewardRow = ( { quest, visuals : visualsProp } ) => {
607- const { quest_reward_type, quest_background, quest_shiny_probability } = quest
608- const getPokemonBackgroundVisuals = usePokemonBackgroundVisuals ( )
609- const visuals = React . useMemo ( ( ) => {
610- if ( visualsProp ) {
611- return visualsProp
612- }
613- if ( quest_reward_type !== 7 ) {
614- return undefined
615- }
616- return getPokemonBackgroundVisuals ( quest_background )
617- } , [
618- visualsProp ,
619- getPokemonBackgroundVisuals ,
620- quest_background ,
621- quest_reward_type ,
622- ] )
608+ const QuestRewardRow = ( { quest, visuals } ) => {
609+ const { quest_reward_type, quest_shiny_probability } = quest
623610 const hasBackground = visuals ?. hasBackground ?? false
624611 const applyBackground = quest_reward_type === 7 && hasBackground
625612 const backgroundMeta = visuals ?. backgroundMeta
@@ -670,13 +657,7 @@ const QuestRewardRow = ({ quest, visuals: visualsProp }) => {
670657 wrapperProps = { applyBackground ? { style : { width : '100%' } } : undefined }
671658 surfaceStyle = {
672659 applyBackground
673- ? {
674- margin : '0 -21px' ,
675- padding : '0 21px' ,
676- width : 'calc(100% + 42px)' ,
677- maxWidth : 'calc(100% + 42px)' ,
678- boxSizing : 'border-box' ,
679- }
660+ ? createFullBleedSurfaceStyle ( { horizontal : 21 } )
680661 : undefined
681662 }
682663 >
@@ -1068,13 +1049,7 @@ const ShowcaseEntry = ({
10681049 wrapWhenNoTooltip
10691050 surfaceStyle = {
10701051 hasBackground
1071- ? {
1072- margin : '0 -21px' ,
1073- padding : '0 21px' ,
1074- width : 'calc(100% + 42px)' ,
1075- maxWidth : 'none' ,
1076- boxSizing : 'border-box' ,
1077- }
1052+ ? createFullBleedSurfaceStyle ( { horizontal : 21 } )
10781053 : undefined
10791054 }
10801055 >
0 commit comments