Skip to content

Commit 8f183a9

Browse files
committed
chore: rename contributors to gitContributors
1 parent 5cdfcd7 commit 8f183a9

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

src/layouts/Docs.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ type DocsLayoutProps = Pick<
204204
| "lastUpdatedDate"
205205
| "crowdinContributors"
206206
| "contentNotTranslated"
207-
| "contributors"
207+
| "gitContributors"
208208
> &
209209
Required<Pick<MdPageContent, "lastUpdatedDate">> &
210210
ChildOnlyProp & {
@@ -219,13 +219,13 @@ export const DocsLayout = ({
219219
lastUpdatedDate,
220220
crowdinContributors,
221221
contentNotTranslated,
222-
contributors,
222+
gitContributors,
223223
}: DocsLayoutProps) => {
224224
const isPageIncomplete = !!frontmatter.incomplete
225225
const { asPath: relativePath } = useRouter()
226226
const absoluteEditPath = getEditPath(relativePath)
227227

228-
const gitHubLastEdit = contributors[0]?.date
228+
const gitHubLastEdit = gitContributors[0]?.date
229229
const intlLastEdit = gitHubLastEdit || lastUpdatedDate
230230

231231
const useGitHubContributors =
@@ -246,7 +246,7 @@ export const DocsLayout = ({
246246
{useGitHubContributors ? (
247247
<GitHubContributors
248248
lastUpdatedDate={lastUpdatedDate}
249-
contributors={contributors}
249+
contributors={gitContributors}
250250
/>
251251
) : (
252252
<CrowdinContributors

src/layouts/Tutorial.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ export const tutorialsComponents = {
159159
type TutorialLayoutProps = ChildOnlyProp &
160160
Pick<
161161
MdPageContent,
162-
"tocItems" | "crowdinContributors" | "contentNotTranslated" | "contributors"
162+
| "tocItems"
163+
| "crowdinContributors"
164+
| "contentNotTranslated"
165+
| "gitContributors"
163166
> &
164167
Required<Pick<MdPageContent, "lastUpdatedDate">> & {
165168
frontmatter: TutorialFrontmatter
@@ -174,13 +177,13 @@ export const TutorialLayout = ({
174177
lastUpdatedDate,
175178
crowdinContributors,
176179
contentNotTranslated,
177-
contributors,
180+
gitContributors,
178181
}: TutorialLayoutProps) => {
179182
const { asPath: relativePath } = useRouter()
180183
const absoluteEditPath = getEditPath(relativePath)
181184

182185
const borderColor = useToken("colors", "border")
183-
const gitHubLastEdit = contributors[0]?.date
186+
const gitHubLastEdit = gitContributors[0]?.date
184187
const intlLastEdit = gitHubLastEdit || lastUpdatedDate
185188

186189
const useGitHubContributors =
@@ -208,7 +211,7 @@ export const TutorialLayout = ({
208211
{children}
209212
{useGitHubContributors ? (
210213
<GitHubContributors
211-
contributors={contributors}
214+
contributors={gitContributors}
212215
lastUpdatedDate={lastUpdatedDate}
213216
/>
214217
) : (

src/lib/interfaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export interface MdPageContent {
108108
lastUpdatedDate?: string
109109
contentNotTranslated: boolean
110110
crowdinContributors: CrowdinContributor[]
111-
contributors: FileContributor[]
111+
gitContributors: FileContributor[]
112112
}
113113

114114
// Local environment framework

src/lib/utils/md.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ export const getContentBySlug = (slug: string) => {
334334
const frontmatter = data as Frontmatter
335335
const items: Omit<
336336
MdPageContent,
337-
"tocItems" | "crowdinContributors" | "contributors"
337+
"tocItems" | "crowdinContributors" | "gitContributors"
338338
> = {
339339
slug,
340340
content,

src/pages/[...slug].tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export const getStaticProps = (async (context) => {
197197
tocItems,
198198
crowdinContributors,
199199
gfissues,
200-
contributors: gitContributors,
200+
gitContributors,
201201
},
202202
}
203203
}) satisfies GetStaticProps<Props, Params>
@@ -233,7 +233,7 @@ ContentPage.getLayout = (page) => {
233233
tocItems,
234234
crowdinContributors,
235235
contentNotTranslated,
236-
contributors,
236+
gitContributors,
237237
} = page.props
238238

239239
const layoutProps = {
@@ -244,7 +244,7 @@ ContentPage.getLayout = (page) => {
244244
tocItems,
245245
crowdinContributors,
246246
contentNotTranslated,
247-
contributors,
247+
gitContributors,
248248
}
249249
const Layout = layoutMapping[layout]
250250

0 commit comments

Comments
 (0)