Skip to content

Commit 93d6417

Browse files
committed
Use polymorphic prop to avoid to have too many component in the DOM
1 parent 0d689a4 commit 93d6417

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/theme/components/Post.tsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import { PostDescription } from '../types';
2020
import { Card, CardContainer } from './Card';
2121
import CardFooter from './CardFooter';
2222
import { Fade } from 'react-awesome-reveal';
23-
import { Link } from 'rebass';
24-
import colors from '../colors.json';
2523

2624
const cardMinWidth = '350px';
2725

@@ -96,8 +94,8 @@ export const PostContainer = ({
9694
{pageId && (
9795
<DownFade>
9896
<Flex justifyContent="center" mt="4" mb="2" fontSize={[2, 3]}>
99-
<MoreButton>
100-
<Link href={`/${pageId}`}>More</Link>
97+
<MoreButton as="a" href={`/${pageId}`}>
98+
More
10199
</MoreButton>
102100
</Flex>
103101
</DownFade>
@@ -116,11 +114,9 @@ const MoreButton = styled(Card)`
116114
border-width: 2px;
117115
padding: 0;
118116
119-
& > a {
120-
text-decoration: none;
121-
display: block;
122-
padding: 8px 70px;
123-
font-weight: 600;
124-
color: inherit;
125-
}
117+
text-decoration: none;
118+
display: block;
119+
padding: 8px 70px;
120+
font-weight: 600;
121+
color: inherit;
126122
`;

0 commit comments

Comments
 (0)