Skip to content

Commit 86638da

Browse files
ericyangpanclaude
andcommitted
refactor: remove duplicate communityLinks config and simplify CommunityLinks usage
- Remove redundant communityLinks array from model-providers and vendor pages - Remove explicit title and links props from CommunityLinks component - Add index signature to ManifestResourceUrls for dynamic resource keys CommunityLinks component now handles link configuration internally, reducing duplication across pages. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 46d3ef5 commit 86638da

File tree

3 files changed

+1
-82
lines changed

3 files changed

+1
-82
lines changed

src/app/[locale]/model-providers/[slug]/page.tsx

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -89,45 +89,6 @@ export default async function ProviderPage({
8989
},
9090
]
9191

92-
// Build community links configuration
93-
const communityLinks = [
94-
{
95-
key: 'linkedin',
96-
title: t('community.linkedin.title'),
97-
description: t('community.linkedin.description'),
98-
},
99-
{
100-
key: 'twitter',
101-
title: t('community.twitter.title'),
102-
description: t('community.twitter.description'),
103-
},
104-
{
105-
key: 'github',
106-
title: t('community.github.title'),
107-
description: t('community.github.description'),
108-
},
109-
{
110-
key: 'youtube',
111-
title: t('community.youtube.title'),
112-
description: t('community.youtube.description'),
113-
},
114-
{
115-
key: 'discord',
116-
title: t('community.discord.title'),
117-
description: t('community.discord.description'),
118-
},
119-
{
120-
key: 'reddit',
121-
title: t('community.reddit.title'),
122-
description: t('community.reddit.description'),
123-
},
124-
{
125-
key: 'blog',
126-
title: t('community.blog.title'),
127-
description: t('community.blog.description'),
128-
},
129-
]
130-
13192
// Breadcrumb items
13293
const breadcrumbItems = [
13394
{ name: tGlobal('shared.common.aiCodingStack'), href: '/ai-coding-stack' },
@@ -169,8 +130,6 @@ export default async function ProviderPage({
169130

170131
<CommunityLinks
171132
communityUrls={provider.communityUrls}
172-
title={t('communityLinks')}
173-
links={communityLinks}
174133
layout="vertical"
175134
gridCols="grid-cols-2 md:grid-cols-4"
176135
/>

src/app/[locale]/vendors/[slug]/page.tsx

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -96,45 +96,6 @@ export default async function VendorPage({
9696
locale: locale as 'en' | 'zh-Hans' | 'de' | 'ko',
9797
})
9898

99-
// Build community links configuration
100-
const communityLinks = [
101-
{
102-
key: 'linkedin',
103-
title: t('community.linkedin.title'),
104-
description: t('community.linkedin.description'),
105-
},
106-
{
107-
key: 'twitter',
108-
title: t('community.twitter.title'),
109-
description: t('community.twitter.description'),
110-
},
111-
{
112-
key: 'github',
113-
title: t('community.github.title'),
114-
description: t('community.github.description'),
115-
},
116-
{
117-
key: 'youtube',
118-
title: t('community.youtube.title'),
119-
description: t('community.youtube.description'),
120-
},
121-
{
122-
key: 'discord',
123-
title: t('community.discord.title'),
124-
description: t('community.discord.description'),
125-
},
126-
{
127-
key: 'reddit',
128-
title: t('community.reddit.title'),
129-
description: t('community.reddit.description'),
130-
},
131-
{
132-
key: 'blog',
133-
title: t('community.blog.title'),
134-
description: t('community.blog.description'),
135-
},
136-
]
137-
13899
// Find all products by this vendor
139100
// Note: Products store vendor.name, not vendor.id, so we match against vendor.name
140101
const vendorIdes = findVendorItems<ManifestIDE>(ides, vendor.name, locale as Locale).map(ide => ({
@@ -192,8 +153,6 @@ export default async function VendorPage({
192153

193154
<CommunityLinks
194155
communityUrls={vendor.communityUrls}
195-
title={t('communityLinks')}
196-
links={communityLinks}
197156
layout="vertical"
198157
gridCols="grid-cols-2 md:grid-cols-4"
199158
/>

src/types/manifests.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export interface ManifestResourceUrls {
9393
pricing: string | null
9494
mcp: string | null
9595
issue: string | null
96+
[key: string]: string | null
9697
}
9798

9899
/**

0 commit comments

Comments
 (0)