Skip to content

Commit a7070a7

Browse files
authored
Add hyperlink to Zulip in Contribute Page (#373)
* Create contributeIntro.js and replace it with contributeIntro.json in the index file * Update the snapshot test for the conribute page
1 parent a43e683 commit a7070a7

File tree

3 files changed

+44
-3
lines changed

3 files changed

+44
-3
lines changed

src/Components/Contribute/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import React from 'react';
22
import SectionHeader from '../SectionHeader';
3-
import content from '../../content/contributeIntro.json';
3+
import content from '../../content/contributeIntro';
44
import ImageContent from './../ImageContent';
55
import { MainContainer, Box, Content, Description } from './style';
66
import Hyperlink from 'react-native-hyperlink';
7+
import HTMLReactParser from 'html-react-parser';
78

89
function Contribute() {
910
const renderContent = () => {
@@ -19,7 +20,7 @@ function Contribute() {
1920
linkStyle={{ color: '#2980b9' }}
2021
onPress={(url) => window.open(url, '_blank')}
2122
>
22-
<Description key={index}>{content.par}</Description>
23+
<Description key={index}>{HTMLReactParser(content.par)}</Description>
2324
</Hyperlink>
2425
);
2526
})}

src/content/contributeIntro.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const contributeIntro = {
2+
sections: [
3+
{
4+
title: "New to Open Source?",
5+
content: [
6+
{
7+
par: "Contributing to open source for the first time can be a little scary and overwhelming. AnitaB.org Open Source is here to help you get started on learning how to contribute to open source. "
8+
},
9+
{
10+
par: "AnitaB.org Open Source has a variety of open source projects on GitHub (https://github.com/anitab-org) for everyone to contribute. If you have never contributed to an open source project, check out each repository and try out 'First Timers Only' issues."
11+
},
12+
{
13+
par: "We encourage contributions of ALL kinds (content, design, coding, documentation, testing, etc) from community members. Each member has the opportunity to gain global collaboration experience working on projects with social impact and improve hard & soft skills while participating as a volunteer, mentor, writer, coder, designer, app tester, and more!"
14+
},
15+
{
16+
par: "Here are some list of contributions to any of the AnitaB.org Open Source projects, for example: create GitHub issues regarding an open source project, work on/ debug a project issue, update project documentation, create organization content, create/test a pull request, produce mockups for websites/ applications/ organization promotional material, research on UI/UX improvements and accessibilty features, etc."
17+
},
18+
{
19+
par:
20+
'Each active repository has an individual stream on <a href ="https://anitab-org.zulipchat.com" style="color:#2980b9; text-decoration:none">Zulip</a>. If you have any questions and not sure how to get started, please ping us on <a href ="https://anitab-org.zulipchat.com" style="color:#2980b9; text-decoration:none">Zulip</a> and we are happy to help!'
21+
}
22+
]
23+
}
24+
]
25+
}
26+
export default contributeIntro;

src/test/__snapshots__/Contribute.test.js.snap

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,21 @@ exports[`should take a snapshot 1`] = `
156156
dir="auto"
157157
style="font-size: 18px; font-weight: 200; margin-top: 26px; text-align: left;"
158158
>
159-
Each active repository has an individual stream on Zulip. If you have any questions and not sure how to get started, please ping us on Zulip and we are happy to help!
159+
Each active repository has an individual stream on
160+
<a
161+
href="https://anitab-org.zulipchat.com"
162+
style="color: rgb(41, 128, 185); text-decoration: none;"
163+
>
164+
Zulip
165+
</a>
166+
. If you have any questions and not sure how to get started, please ping us on
167+
<a
168+
href="https://anitab-org.zulipchat.com"
169+
style="color: rgb(41, 128, 185); text-decoration: none;"
170+
>
171+
Zulip
172+
</a>
173+
and we are happy to help!
160174
</div>
161175
</div>
162176
</div>

0 commit comments

Comments
 (0)