Skip to content

Commit e04e0d3

Browse files
committed
Merge remote-tracking branch 'origin' into refactor/card-columns
2 parents 79adedc + 6461d76 commit e04e0d3

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

components/ContactUsCards.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export default function ContactUsCards() {
4343
]}
4444
altTags={['FAQ', 'Blog', 'Repository']}
4545
content={[
46-
'You can find the main questions about the project.',
47-
'You can share your projects and ideas to all our community.',
48-
'You can see most used codes, guidelines and more.',
46+
'Find the main questions about the project.',
47+
'Share your projects and ideas with our community.',
48+
'Check out our codebase and guidelines.',
4949
]}
5050
links={[
5151
'https://github.com/Web-Dev-Path/web-dev-path/wiki/FAQ',

components/containers/Card.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ export default function Card({
66
card: { image, altTag, title, content, link, linkText },
77
customClass,
88
}) {
9+
const LinkComponent = link?.startsWith('http') ? (
10+
<a href={link} target='_blank' rel='noopener noreferrer'>
11+
{linkText}
12+
</a>
13+
) : (
14+
<Link href={link}>{linkText}</Link>
15+
);
916
return (
1017
<div
1118
className={
@@ -27,7 +34,7 @@ export default function Card({
2734
<h2 className={styles.title}>{title}</h2>
2835
<div className={styles.content}>
2936
<p>
30-
{content} {link && <Link href={link}>{linkText}</Link>}
37+
{content} {link && LinkComponent}
3138
</p>
3239
</div>
3340
</div>

0 commit comments

Comments
 (0)