-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #955 from Code4GovTech/feature/c4gt
Feature/c4gt
- Loading branch information
Showing
14 changed files
with
977 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ npm-shrinkwrap.json | |
|
||
# Misc | ||
.DS_Store | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,5 +41,8 @@ | |
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"devDependencies": { | ||
"dotenv": "^16.4.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import React from "react"; | ||
|
||
function C4GT2024Page() { | ||
return ( | ||
<div | ||
className="container padding-top--md padding-bottom--lg" | ||
style={{ minHeight: "60vh" }} | ||
> | ||
<div className="row"> | ||
<div className="col width"> | ||
<div> | ||
<article> | ||
<nav | ||
className="theme-doc-breadcrumbs" | ||
style={{ marginBottom: ".4rem" }} | ||
aria-label="breadcrumbs" | ||
> | ||
<ul className="breadcrumbs"> | ||
<li className="breadcrumbs__item"> | ||
<a className="breadcrumbs__link breadcrumbs-items" href="/"> | ||
🏠 | ||
</a> | ||
</li> | ||
<li className="breadcrumbs__item breadcrumbs__item--active"> | ||
<a | ||
className="breadcrumbs__link breadcrumbs-items" | ||
href="/docs/2024/" | ||
style={{ cursor: "pointer" }} | ||
> | ||
C4GT'24 | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
<div className="theme-doc-markdown markdown"> | ||
<header> | ||
<h1>C4GT'24</h1> | ||
</header> | ||
<p> | ||
C4GT Mentoring Program has been conceptualized as a summer | ||
coding program to create a close-knit community that can build | ||
and contribute to global digital public goods. | ||
</p> | ||
<ul> | ||
<li> | ||
An opportunity for college students and working | ||
professionals in India to experience the GovTech space | ||
</li> | ||
<li>Organized annually over 2 months (July-August)</li> | ||
<li> | ||
There will be a set of diverse and engaging GovTech problem | ||
statements every year for the participants to work on | ||
</li> | ||
<li> | ||
Shortlisted contributors will receive mentorship from | ||
leading practitioners in GovTech ecosystem | ||
</li> | ||
</ul> | ||
<p>Thanks for being part of the community. 💚</p> | ||
</div> | ||
</article> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default C4GT2024Page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
import React, { useEffect, useState } from "react"; | ||
import { useHistory } from "react-router-dom"; | ||
import useParseMarkdown from "../hooks/useParseMarkdown"; | ||
|
||
function ProjectDescription({ | ||
currentIssue, | ||
currentIssueData, | ||
setCurrentTab, | ||
setSelectedProject, | ||
setIssueNumber, | ||
error, | ||
setError | ||
}) { | ||
const history = useHistory(); | ||
const {API_AUTH_KEY,API_BASE_URL} = useParseMarkdown(); | ||
const [description, setDescription] = useState(null); | ||
const [mobile, setMobile] = useState(false); | ||
|
||
useEffect(() => { | ||
setError(()=>null); | ||
fetch(`${API_BASE_URL}/issues/${currentIssue}`, { | ||
method: "GET", | ||
headers: { | ||
"X-Secret-Key": API_AUTH_KEY, | ||
}, | ||
}) | ||
.then((response) => { | ||
if (!response.ok) { | ||
throw new Error(`Error! status: ${response.status}`); | ||
} | ||
return response.json(); | ||
}) | ||
.then((data) => { | ||
setDescription(() => data); | ||
}) | ||
.catch((error) => { | ||
setError(error); | ||
}); | ||
}, [currentIssue]); | ||
|
||
useEffect(() => { | ||
const handleResize = () => { | ||
if (window.innerWidth < 997) { | ||
setMobile(true); | ||
} else { | ||
setMobile(false); | ||
} | ||
}; | ||
handleResize(); | ||
|
||
window.addEventListener("resize", handleResize); | ||
|
||
return () => { | ||
window.removeEventListener("resize", handleResize); | ||
}; | ||
}, []); | ||
return ( | ||
<> | ||
{!error && ( | ||
<div | ||
className="container padding-top--md padding-bottom--lg" | ||
style={{ minHeight: "60vh" }} | ||
> | ||
<div className="row"> | ||
<div className="col width"> | ||
<div> | ||
<article> | ||
<nav | ||
className="theme-doc-breadcrumbs" | ||
style={{ marginBottom: ".4rem" }} | ||
aria-label="breadcrumbs" | ||
> | ||
<ul className="breadcrumbs"> | ||
<li className="breadcrumbs__item"> | ||
<a | ||
className="breadcrumbs__link breadcrumbs-items" | ||
href="/" | ||
> | ||
🏠 | ||
</a> | ||
</li> | ||
<li className="breadcrumbs__item breadcrumbs__item--active"> | ||
<a | ||
className="breadcrumbs__link breadcrumbs-items" | ||
href={`/docs/2024/org?id=${description?.name}`} | ||
style={{ cursor: "pointer" }} | ||
> | ||
{description?.name} | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
<div className="theme-doc-markdown markdown"> | ||
<header> | ||
<h1>{description?.name}</h1> | ||
</header> | ||
<p>{description?.description}</p> | ||
{mobile && ( | ||
<> | ||
<h3> | ||
Following are the list of Issues associated with the | ||
organization | ||
</h3> | ||
{currentIssueData?.length != 0 && ( | ||
<ul> | ||
{currentIssueData?.map((d, i) => { | ||
return ( | ||
<li key={i}> | ||
<a | ||
onClick={() => { | ||
const newUrl = `/docs/2024/org?id=${currentIssue}&issue=${d.name}`; | ||
history.push(newUrl); | ||
setCurrentTab(() => "subDescription"); | ||
setSelectedProject(() => d.name); | ||
setIssueNumber(() => d.issue_number); | ||
}} | ||
> | ||
{d.name} | ||
</a> | ||
</li> | ||
); | ||
})} | ||
</ul> | ||
)} | ||
</> | ||
)} | ||
</div> | ||
</article> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
)} | ||
</> | ||
); | ||
} | ||
|
||
export default ProjectDescription; |
Oops, something went wrong.