Skip to content

Commit 87191a4

Browse files
committed
handle multiple viewUrls
1 parent 5aa3830 commit 87191a4

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/features/adv/components/AdvBanner.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ export const AdvBanner = () => {
7373
</a>
7474
</span>
7575
</div>
76-
{ad.viewUrl && <img src={ad.viewUrl} key={ad.viewUrl} className="hidden" alt="" />}
76+
{ad.viewUrl &&
77+
ad.viewUrl
78+
.split('||')
79+
.map((viewUrl, i) => <img key={i} src={viewUrl} className="hidden" alt="" />)}
7780
</div>
7881
)
7982
}

src/features/adv/types/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
type AdProvider = {
2-
name: string,
3-
title: string,
4-
link?: string,
2+
name: string
3+
title: string
4+
link?: string
55
}
66

77
type NextAdType = {
@@ -18,4 +18,4 @@ export type Ad = {
1818
backgroundColor?: string
1919
provider: AdProvider
2020
nextAd?: NextAdType
21-
}
21+
}

0 commit comments

Comments
 (0)