Skip to content

Commit 8507d84

Browse files
committed
Rename Author component to Contributor.
1 parent a0810d3 commit 8507d84

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

components/mdx/Author.tsx renamed to components/mdx/Contributor.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { Box, Text, Link, HStack, Avatar, Center } from '@chakra-ui/react'
22
import NextLink from 'next/link'
33
import { contributors } from '@data/contributors'
44

5-
interface AuthorProps {
5+
interface ContributorProps {
66
handle: string
77
avatarSize?: string
88
}
99

10-
export function Author({ handle, avatarSize }: AuthorProps) {
11-
const author = contributors[handle]
12-
if (!author) {
10+
export function Contributor({ handle, avatarSize }: ContributorProps) {
11+
const contrib = contributors[handle]
12+
if (!contrib) {
1313
return null
1414
}
1515

@@ -18,27 +18,27 @@ export function Author({ handle, avatarSize }: AuthorProps) {
1818
<Center width={40}>
1919
<Avatar
2020
size={avatarSize}
21-
name={author.displayName}
22-
src={author.avatarUrl}
21+
name={contrib.displayName}
22+
src={contrib.avatarUrl}
2323
/>
2424
</Center>
2525
<Box>
26-
{author.moreInfoUrl && (
26+
{contrib.moreInfoUrl && (
2727
<Link
2828
as={NextLink}
29-
href={author.moreInfoUrl}
29+
href={contrib.moreInfoUrl}
3030
passHref
3131
isExternal
3232
textDecoration="underline"
3333
>
34-
<Text fontSize={18}>{author.displayName}</Text>
34+
<Text fontSize={18}>{contrib.displayName}</Text>
3535
</Link>
3636
)}
37-
{!author.moreInfoUrl && <Text>{author.displayName}</Text>}
37+
{!contrib.moreInfoUrl && <Text>{contrib.displayName}</Text>}
3838

39-
{author.about && (
39+
{contrib.about && (
4040
<Box mt={2} maxWidth="xl">
41-
<Text fontSize={14}>{author.about}</Text>
41+
<Text fontSize={14}>{contrib.about}</Text>
4242
</Box>
4343
)}
4444
</Box>

components/mdx/ContributorFooter.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Box, Text, VStack } from '@chakra-ui/react'
2-
import { Author } from '@components/mdx/Author'
2+
import { Contributor } from '@components/mdx/Contributor'
33

44
interface ContributorFooterProps {
55
authors: string[]
@@ -27,7 +27,7 @@ export function ContributorFooter({
2727
</Text>
2828
<VStack spacing={4} alignItems="left">
2929
{authors.map((contrib) => {
30-
return <Author handle={contrib} avatarSize="2xl" />
30+
return <Contributor handle={contrib} avatarSize="2xl" />
3131
})}
3232
</VStack>
3333
</Box>
@@ -40,7 +40,7 @@ export function ContributorFooter({
4040
</Text>
4141
<VStack spacing={4} alignItems="left">
4242
{reviewers.map((contrib) => {
43-
return <Author handle={contrib} avatarSize="lg" />
43+
return <Contributor handle={contrib} avatarSize="lg" />
4444
})}
4545
</VStack>
4646
</Box>
@@ -55,7 +55,7 @@ export function ContributorFooter({
5555
</Text>
5656
<VStack spacing={4} alignItems="left">
5757
{contributors.map((contrib) => {
58-
return <Author handle={contrib} avatarSize="lg" />
58+
return <Contributor handle={contrib} avatarSize="lg" />
5959
})}
6060
</VStack>
6161
</Box>

0 commit comments

Comments
 (0)