Skip to content

Commit f5086c9

Browse files
ericyangpanclaude
andcommitted
refactor(pages): remove redundant props after component i18n refactoring
Update product detail pages to remove props that are now internalized in components: - Remove locale prop from VendorProducts and VendorModels - Remove redundant title/links props from PlatformLinks - Remove labels prop from ProductHero, use typeValue prop instead - Simplify platform links configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 90fa0e0 commit f5086c9

File tree

6 files changed

+4
-89
lines changed

6 files changed

+4
-89
lines changed

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export default async function CLIPage({
107107
return (
108108
<PageLayout schema={schema}>
109109
<Breadcrumb items={breadcrumbItems} />
110+
110111
<main className="max-w-8xl mx-auto px-[var(--spacing-md)]">
111112
<ProductHero
112113
name={cli.name}
@@ -122,16 +123,6 @@ export default async function CLIPage({
122123
websiteUrl={websiteUrl}
123124
docsUrl={docsUrl}
124125
downloadUrl={downloadUrl}
125-
labels={{
126-
vendor: t('vendor'),
127-
version: t('version'),
128-
license: t('license'),
129-
stars: t('stars'),
130-
platforms: t('platforms'),
131-
visitWebsite: t('visitWebsite'),
132-
documentation: t('documentation'),
133-
download: t('download'),
134-
}}
135126
/>
136127

137128
<RelatedProducts products={relatedProducts} />

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,6 @@ export default async function ExtensionPage({
144144
websiteUrl={websiteUrl}
145145
docsUrl={docsUrl}
146146
downloadUrl={downloadUrl}
147-
labels={{
148-
vendor: t('vendor'),
149-
version: t('version'),
150-
license: t('license'),
151-
stars: t('stars'),
152-
visitWebsite: t('visitWebsite'),
153-
documentation: t('documentation'),
154-
download: t('download'),
155-
}}
156147
/>
157148

158149
<RelatedProducts products={relatedProducts} />

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,6 @@ export default async function IDEPage({
123123
websiteUrl={websiteUrl}
124124
docsUrl={docsUrl}
125125
downloadUrl={downloadUrl}
126-
labels={{
127-
vendor: t('vendor'),
128-
version: t('version'),
129-
license: t('license'),
130-
stars: t('stars'),
131-
platforms: t('platforms'),
132-
visitWebsite: t('visitWebsite'),
133-
documentation: t('documentation'),
134-
download: t('download'),
135-
}}
136126
/>
137127

138128
<RelatedProducts products={relatedProducts} />

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

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -70,25 +70,6 @@ export default async function ProviderPage({
7070
locale: locale as 'en' | 'zh-Hans' | 'de' | 'ko',
7171
})
7272

73-
// Build platform links configuration
74-
const platformLinks = [
75-
{
76-
key: 'huggingface',
77-
title: t('aiPlatforms.huggingface.title'),
78-
description: t('aiPlatforms.huggingface.description'),
79-
},
80-
{
81-
key: 'artificialAnalysis',
82-
title: t('aiPlatforms.artificialAnalysis.title'),
83-
description: t('aiPlatforms.artificialAnalysis.description'),
84-
},
85-
{
86-
key: 'openrouter',
87-
title: t('aiPlatforms.openrouter.title'),
88-
description: t('aiPlatforms.openrouter.description'),
89-
},
90-
]
91-
9273
// Breadcrumb items
9374
const breadcrumbItems = [
9475
{ name: tGlobal('shared.common.aiCodingStack'), href: '/ai-coding-stack' },
@@ -108,22 +89,14 @@ export default async function ProviderPage({
10889
categoryLabel={t('categoryLabel')}
10990
verified={provider.verified ?? false}
11091
type={provider.type}
92+
typeValue={provider.type ? t(`providerTypes.${provider.type}`) : undefined}
11193
websiteUrl={provider.websiteUrl}
11294
docsUrl={provider.docsUrl ?? null}
11395
applyKeyUrl={provider.applyKeyUrl}
114-
labels={{
115-
type: t('type'),
116-
typeValue: provider.type ? t(`providerTypes.${provider.type}`) : undefined,
117-
visitWebsite: t('visitWebsite'),
118-
documentation: t('documentation'),
119-
getApiKey: t('getApiKey'),
120-
}}
12196
/>
12297

12398
<PlatformLinks
12499
platformUrls={provider.platformUrls}
125-
title={t('findOnAiPlatforms')}
126-
links={platformLinks}
127100
layout="horizontal"
128101
gridCols="grid-cols-1 md:grid-cols-3"
129102
/>

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

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -94,25 +94,6 @@ export default async function ModelPage({
9494
{ label: t('maxOutput'), value: `${model.maxOutput.toLocaleString()} tokens` },
9595
].filter(Boolean) as { label: string; value: string }[]
9696

97-
// Build platform links configuration
98-
const platformLinks = [
99-
{
100-
key: 'huggingface',
101-
title: t('aiPlatforms.huggingface.title'),
102-
description: t('aiPlatforms.huggingface.description'),
103-
},
104-
{
105-
key: 'artificialAnalysis',
106-
title: t('aiPlatforms.artificialAnalysis.title'),
107-
description: t('aiPlatforms.artificialAnalysis.description'),
108-
},
109-
{
110-
key: 'openrouter',
111-
title: t('aiPlatforms.openrouter.title'),
112-
description: t('aiPlatforms.openrouter.description'),
113-
},
114-
]
115-
11697
// Breadcrumb items
11798
const breadcrumbItems = [
11899
{ name: tGlobal('shared.common.aiCodingStack'), href: '/ai-coding-stack' },
@@ -135,17 +116,10 @@ export default async function ModelPage({
135116
additionalInfo={additionalInfo}
136117
websiteUrl={model.websiteUrl || undefined}
137118
docsUrl={model.docsUrl || undefined}
138-
labels={{
139-
vendor: t('vendor'),
140-
visitWebsite: t('visitWebsite'),
141-
documentation: t('labels.documentation'),
142-
}}
143119
/>
144120

145121
<PlatformLinks
146122
platformUrls={model.platformUrls}
147-
title={t('findOnAiPlatforms')}
148-
links={platformLinks}
149123
layout="horizontal"
150124
gridCols="grid-cols-1 md:grid-cols-3"
151125
/>

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,13 @@ export default async function VendorPage({
139139
verified={vendor.verified ?? false}
140140
websiteUrl={vendor.websiteUrl}
141141
docsUrl={vendor.docsUrl ?? null}
142-
labels={{
143-
visitWebsite: t('visitWebsite'),
144-
documentation: t('documentation'),
145-
}}
146142
/>
147143

148144
{/* Vendor Products (IDEs, CLIs, Extensions) */}
149-
<VendorProducts products={vendorProducts} locale={locale} title={t('products')} />
145+
<VendorProducts products={vendorProducts} />
150146

151147
{/* Vendor Models */}
152-
<VendorModels models={vendorModels} locale={locale} title={t('models')} />
148+
<VendorModels models={vendorModels} />
153149

154150
<CommunityLinks
155151
communityUrls={vendor.communityUrls}

0 commit comments

Comments
 (0)