-
Notifications
You must be signed in to change notification settings - Fork 29
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 #1663 from dev-launchers/ramy-coder/jointalcomm1467
For talcomm fixing routing
- Loading branch information
Showing
8 changed files
with
241 additions
and
122 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
apps/dev-recruiters/src/components/modules/NewJoinPageComponent/HeaderJoinPage/index.tsx
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import React from 'react'; | ||
import { | ||
HeaderContainer, | ||
HeaderText, | ||
|
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
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
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
29 changes: 29 additions & 0 deletions
29
apps/dev-recruiters/src/components/modules/ThankyouPage/index.tsx
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,29 @@ | ||
import React from 'react'; | ||
import { | ||
BaseText, | ||
HeaderContainer, | ||
HeaderText, | ||
SubHeaderContainer, | ||
SubHeaderText, | ||
Wrapper, | ||
} from './styles'; | ||
import BoxContainer from '../../common/BoxContainer'; | ||
import { Wrap } from '../TalcommunityPage/StyledTalcommunityPage'; | ||
|
||
export function ThankyouPage() { | ||
return ( | ||
<> | ||
<Wrapper> | ||
<HeaderContainer>Thank you!</HeaderContainer> | ||
<SubHeaderContainer> | ||
Your application for the Dev Launchers Talent Community has been | ||
received. | ||
<SubHeaderContainer> | ||
We will email you when a volunteer role that matches your skillsets | ||
and/or interests opens up! | ||
</SubHeaderContainer> | ||
</SubHeaderContainer> | ||
</Wrapper> | ||
</> | ||
); | ||
} |
65 changes: 65 additions & 0 deletions
65
apps/dev-recruiters/src/components/modules/ThankyouPage/styles.ts
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,65 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const HeaderContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
text-align: center; | ||
margin: 0; | ||
row-gap: 1rem; | ||
margin-top: 200px; | ||
padding-bottom: 5px; | ||
color: black; | ||
font-size: 44px; | ||
font-family: Abel; | ||
font-weight: 400; | ||
word-wrap: break-word; | ||
padding-bottom: 56px; | ||
`; | ||
|
||
export const SubHeaderContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
text-align: center; | ||
margin: 0; | ||
/* row-gap: 0.5rem; */ | ||
height: auto; | ||
color: black; | ||
font-size: 20px; | ||
font-family: Nunito Sans; | ||
font-weight: 400; | ||
line-height: 28px; | ||
word-wrap: break-word; | ||
padding-bottom: 0; | ||
`; | ||
|
||
export const BaseText = styled.div` | ||
word-wrap: break-word; | ||
color: ${({ theme }) => theme?.colors?.NEUTRAL_1}; | ||
`; | ||
|
||
export const HeaderText = styled(BaseText)` | ||
font-size: 44px; | ||
font-family: 'Abel', sans-serif; | ||
font-weight: 400; | ||
color: white; | ||
overflow: hidden; | ||
position: relative; | ||
`; | ||
|
||
export const SubHeaderText = styled(BaseText)` | ||
font-size: 20px; | ||
font-family: 'Nunito Sans', sans-serif; | ||
color: white; | ||
font-weight: 400; | ||
padding-bottom: 24px; | ||
overflow: hidden; | ||
position: relative; | ||
`; | ||
export const Wrapper = styled.div` | ||
background-color: ${({ theme }) => theme?.colors?.SilverSandT20}; | ||
height: 500px; | ||
`; |
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,119 @@ | ||
import { GetStaticProps } from 'next'; | ||
import Head from 'next/head'; | ||
import { Opportunity } from '@devlaunchers/models/opportunity'; | ||
import { Project } from '@devlaunchers/models/project'; | ||
import agent from '@devlaunchers/utility/agent'; | ||
import OpportunitiesAggregator from '../components/modules/OpportunitiesAggregator/OpportunitiesAggregator'; | ||
import OpportunitiesAggregatorWithRoles from '../components/modules/OpportunitiesAggregatorWithRoles/OpportunitiesAggregator'; | ||
|
||
import { useRouter } from 'next/router'; | ||
import { ThemeProvider } from 'styled-components'; | ||
import theme from '../styles/theme'; | ||
|
||
export const getStaticProps: GetStaticProps = async (context) => { | ||
let projects: Project[] = []; | ||
let opportunities: Opportunity[] = []; | ||
try { | ||
const result = await agent.Projects.list( | ||
new URLSearchParams('_publicationState=live') | ||
); | ||
projects = result.filter((p: Project) => p.opportunities.length > 0); | ||
projects.map((project) => { | ||
const commitments = project.opportunities.map( | ||
(opp) => opp.commitmentHoursPerWeek | ||
); | ||
// console.log(commitments); | ||
const maxCommitment = Math.max(...commitments); | ||
const minCommitment = Math.min(...commitments); | ||
project.commitmentLevel = `${minCommitment} - ${maxCommitment}`; | ||
return project; | ||
}); | ||
} catch (error) { | ||
console.error('An error occurred while fetching Projects', error); | ||
} | ||
|
||
try { | ||
const result = await agent.Opportunities.list(); | ||
opportunities = result.filter((o: Opportunity) => o.projects.length > 0); | ||
} catch (error) { | ||
console.error('An error occurred while fetching Opportunities', error); | ||
} | ||
|
||
return { | ||
props: { | ||
projects, | ||
opportunities, | ||
}, | ||
revalidate: 10, | ||
}; | ||
}; | ||
|
||
interface Props { | ||
projects: Project[]; | ||
opportunities: Opportunity[]; | ||
} | ||
|
||
const IndexPage = ({ projects, opportunities }: Props) => { | ||
const router = useRouter(); | ||
const { format } = router.query; | ||
|
||
return ( | ||
<> | ||
<Head> | ||
<title>Dev Discovery</title> | ||
<meta name="title" content="Dev Discovery"></meta> | ||
<meta | ||
name="description" | ||
content="Create, discover, and join open-source software projects! We help members to contribute meaningfully and gain industry-ready experience along the way. Build epic products, tools, and games used by real people while learning valuable skills and meeting awesome people!" | ||
></meta> | ||
|
||
<meta property="og:type" content="website"></meta> | ||
<meta | ||
property="og:url" | ||
content="https://devlaunchers.org/projects" | ||
></meta> | ||
<meta | ||
property="og:image" | ||
content="/images/DevlaunchersGitHubThumb.png" | ||
></meta> | ||
<meta property="og:title" content="Dev Discovery"></meta> | ||
<meta | ||
property="og:description" | ||
content="Create, discover, and join open-source software projects! We help members to contribute meaningfully and gain industry-ready experience along the way. Build epic products, tools, and games used by real people while learning valuable skills and meeting awesome people!" | ||
></meta> | ||
|
||
<meta property="twitter:card" content="summary_large_image" /> | ||
<meta | ||
property="twitter:url" | ||
content="https://devlaunchers.org/projects" | ||
/> | ||
<meta property="twitter:title" content="Dev Discovery" /> | ||
<meta | ||
property="twitter:description" | ||
content="Create, discover, and join open-source software projects! We help members to contribute meaningfully and gain industry-ready experience along the way. Build epic products, tools, and games used by real people while learning valuable skills and meeting awesome people!" | ||
/> | ||
<meta | ||
property="twitter:image" | ||
content="/images/DevlaunchersGitHubThumb.png" | ||
/> | ||
<meta content="#ff7f0e" data-react-helmet="true" name="theme-color" /> | ||
</Head> | ||
{/* TODO: Remove the old theme and standarize the one coming from @devlaunchers/components */} | ||
<ThemeProvider theme={theme}> | ||
{format === 'roles' ? ( | ||
<OpportunitiesAggregatorWithRoles | ||
projects={projects} | ||
opportunities={opportunities} | ||
/> | ||
) : ( | ||
<OpportunitiesAggregator | ||
projects={projects} | ||
opportunities={opportunities} | ||
/> | ||
)} | ||
</ThemeProvider> | ||
</> | ||
); | ||
}; | ||
|
||
export default IndexPage; |
Oops, something went wrong.