Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added CA Page #106

Merged
merged 3 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions config/content/CA.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
export const CADetails = {
title: 'Campus Ambassador Program',
content: [
{
title: 'Perks',
list: [
'Certificate of appreciation',
'Free merchandise and gift hampers on completion of certain milestones',
'Free of cost access to webinar and workshop',
'Publicity in social media handles',
'Special discount for next fest by NIT Rourkela',
'Building network and personal connections',
],
},
{
title: 'Procedure',
list: [
'Register yourself for INNOVISION at inno.nitrkl.in',
'Go to CA program',
'Click on Register as CA',
'Register as CA',
'Your Mobile Number is your Unique Referral Code',
'Help your friends register themselves and apply the unique Referral code',
'Win Goodies and Hampers',
],
},
],
button: {
text: 'Register as Campus Ambassador',
link: 'https://forms.gle/i1tzjmebnmySJsLb9',
},
};
5 changes: 5 additions & 0 deletions config/content/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export default {
name: 'Refund Policy',
link: 'https://drive.google.com/file/d/1cLnuEBtt7yFfC1dQeFVOP0Oxf_hsCTzb/view',
},
{
id: 5,
name: 'CA Program',
link: '/ca',
},
],
},
information: [
Expand Down
44 changes: 44 additions & 0 deletions src/components/CAProgram/CAProgram.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React from 'react';
import { Body1, Heading2, Heading3, SectionLayout } from '../shared';
import { CADetails } from '../../../config/content/CA';
import { ButtonContainer, ItemsContainer, PerksContainer } from './styles';
import Button from '../shared/Button';

const CAProgram = () => (
<SectionLayout>
<Heading2>{CADetails.title}</Heading2>
<ItemsContainer>
{CADetails.content.map((item) => (
<div
key={item.title}
style={{
width: '100%',
display: 'flex',
flexDirection: 'column',
gap: '24px',
}}
>
<Heading3
style={{
color: '#91F9D3',
}}
>
{item.title}
</Heading3>
<PerksContainer>
{item.list.map((listItem, index) => (
<Body1 key={listItem}>
{index + 1}. {listItem}
</Body1>
))}
</PerksContainer>
</div>
))}
</ItemsContainer>
<ButtonContainer>
<Button text={CADetails.button.text} variant='filled' link={CADetails.button.link} />
</ButtonContainer>
</SectionLayout>
);

export default CAProgram;
35 changes: 35 additions & 0 deletions src/components/CAProgram/styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import styled from 'styled-components';
import tw from 'twin.macro';

export const PerksContainer = styled.div`
${tw`
flex
flex-col
gap-2
`}
`;

export const ItemsContainer = styled.div`
${tw`
w-[95%]
mx-auto
flex
flex-col
gap-10
mt-10
`}

@media (max-width: 512px) {
width: 100%;
}
`;

export const ButtonContainer = styled.div`
${tw`
md:w-[20%]
mx-auto
w-[40%]
flex
justify-center
`}
`;
12 changes: 12 additions & 0 deletions src/pages/ca.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The page name can be changed. https://inno.nitrkl.in/ca doesn't look good. 🤪

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any suggestions?

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-disable max-len */
import React from 'react';
import CAProgram from '../components/CAProgram/CAProgram';
import { PrivateRoute } from '../components';

const CA = () => (
<PrivateRoute>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think privateRoute is required here as logon is not necessary to access the page.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is mentioned as part of CA Registration process, that one needs to be logged in before CA Registration

<CAProgram />
</PrivateRoute>
);

export default CA;
Loading