Skip to content

Commit 883f2e1

Browse files
committed
fix: skip attestant feed fetch
for custom html paths, add to array and will be skipped by xml parser
1 parent 1f65410 commit 883f2e1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/[locale]/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { getLocaleTimestamp } from "@/lib/utils/time"
1919
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
2020

2121
import {
22+
ATTESTANT_BLOG,
2223
BASE_TIME_UNIT,
2324
BLOG_FEEDS,
2425
BLOGS_WITHOUT_FEED,
@@ -39,7 +40,8 @@ import { fetchTotalValueLocked } from "@/lib/api/fetchTotalValueLocked"
3940

4041
// API calls
4142
const fetchXmlBlogFeeds = async () => {
42-
return await fetchRSS(BLOG_FEEDS)
43+
const xmlUrls = BLOG_FEEDS.filter((feed) => ![ATTESTANT_BLOG].includes(feed))
44+
return await fetchRSS(xmlUrls)
4345
}
4446

4547
// In seconds

src/lib/constants.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ export const RSS_DISPLAY_COUNT = 6
175175

176176
export const VITALIK_FEED = "https://vitalik.eth.limo/feed.xml"
177177
export const SOLIDITY_FEED = "https://soliditylang.org/feed.xml"
178+
export const ATTESTANT_BLOG = "https://www.attestant.io/posts/"
178179

179180
export const COMMUNITY_BLOGS: CommunityBlog[] = [
180181
{
@@ -197,10 +198,7 @@ export const COMMUNITY_BLOGS: CommunityBlog[] = [
197198
name: "0xPARC",
198199
href: "https://0xparc.org/blog",
199200
},
200-
{
201-
href: "https://www.attestant.io/posts/",
202-
feed: "https://www.attestant.io/posts/",
203-
},
201+
{ href: ATTESTANT_BLOG, feed: ATTESTANT_BLOG },
204202
{ name: "Devcon", href: "https://devcon.org/en/blogs/" },
205203
{
206204
href: "https://soliditylang.org/blog/",

0 commit comments

Comments
 (0)