Skip to content

Commit c43a6bd

Browse files
committed
fix: complete re redner
1 parent 2582591 commit c43a6bd

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/components/post/SideAd.tsx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export default function SideAd() {
135135
return (
136136
<Wrapper>
137137
<Positioner ref={element} style={{ left: leftPosition }}>
138-
{isDesktop ? (
138+
{isDesktop && mode === 'mini' && (
139139
<AdBlock
140140
width={size.width}
141141
height={size.height}
@@ -150,7 +150,23 @@ export default function SideAd() {
150150
slot={adSlot}
151151
/>
152152
</AdBlock>
153-
) : null}
153+
)}
154+
{isDesktop && mode === 'regular' && (
155+
<AdBlock
156+
width={size.width}
157+
height={size.height}
158+
style={{
159+
position: fixed ? 'fixed' : undefined,
160+
top: fixed ? 242 : undefined,
161+
}}
162+
>
163+
<AdInsComponent
164+
width={size.width}
165+
height={size.height}
166+
slot={adSlot}
167+
/>
168+
</AdBlock>
169+
)}
154170
</Positioner>
155171
</Wrapper>
156172
);

0 commit comments

Comments
 (0)