@@ -43,8 +43,6 @@ import { getEditPath } from "@/lib/utils/editPath"
43
43
44
44
import { DEFAULT_LOCALE } from "@/lib/constants"
45
45
46
- import { useClientSideGitHubLastEdit } from "@/hooks/useClientSideGitHubLastEdit"
47
-
48
46
type ContentContainerProps = Pick < BoxProps , "children" | "dir" >
49
47
50
48
const ContentContainer = ( props : ContentContainerProps ) => {
@@ -161,7 +159,7 @@ export const tutorialsComponents = {
161
159
type TutorialLayoutProps = ChildOnlyProp &
162
160
Pick <
163
161
MdPageContent ,
164
- "tocItems" | "crowdinContributors" | "contentNotTranslated"
162
+ "tocItems" | "crowdinContributors" | "contentNotTranslated" | "contributors"
165
163
> &
166
164
Required < Pick < MdPageContent , "lastUpdatedDate" > > & {
167
165
frontmatter : TutorialFrontmatter
@@ -176,14 +174,15 @@ export const TutorialLayout = ({
176
174
lastUpdatedDate,
177
175
crowdinContributors,
178
176
contentNotTranslated,
177
+ contributors,
179
178
} : TutorialLayoutProps ) => {
180
179
const { asPath : relativePath } = useRouter ( )
181
180
const absoluteEditPath = getEditPath ( relativePath )
182
181
183
182
const borderColor = useToken ( "colors" , "border" )
184
- const gitHubLastEdit = useClientSideGitHubLastEdit ( relativePath )
185
- const intlLastEdit =
186
- "data" in gitHubLastEdit ? gitHubLastEdit . data ! : lastUpdatedDate
183
+ const gitHubLastEdit = contributors [ 0 ] ?. date
184
+ const intlLastEdit = gitHubLastEdit || lastUpdatedDate
185
+
187
186
const useGitHubContributors =
188
187
frontmatter . lang === DEFAULT_LOCALE || crowdinContributors . length === 0
189
188
@@ -209,7 +208,7 @@ export const TutorialLayout = ({
209
208
{ children }
210
209
{ useGitHubContributors ? (
211
210
< GitHubContributors
212
- relativePath = { relativePath }
211
+ contributors = { contributors }
213
212
lastUpdatedDate = { lastUpdatedDate }
214
213
/>
215
214
) : (
0 commit comments