Skip to content

Commit

Permalink
Merge pull request #710 from Ignitus/develop
Browse files Browse the repository at this point in the history
Master > Develop.
  • Loading branch information
divyanshu-rawat authored Apr 6, 2020
2 parents 7aa84be + b730bf8 commit bab14f6
Show file tree
Hide file tree
Showing 77 changed files with 1,723 additions and 808 deletions.
3 changes: 1 addition & 2 deletions src/ignitus-AboutPage/ignitus-CoreTeam/Components/team.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable react/prop-types */
/* eslint-disable class-methods-use-this */
/* eslint-disable jsx-a11y/mouse-events-have-key-events */
import React from 'react';
Expand All @@ -7,7 +6,7 @@ import {withErrorBoundary} from '../../../ignitus-Shared/ignitus-ErrorHandlingCo
import * as S from '../Styles';
import * as T from '../../../ignitus-Shared/ignitus-DesignSystem/shared';
import {Team, TeamItemProps} from '../types';
import {AppIcon} from '../../../ignitus-Shared/types/iconsTypes/enums';
import {AppIcon} from '../../../ignitus-Shared/types/iconsTypes/iconEnums';
import { Paragraph } from '../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/typography';

const PureCoreTeam = ({team}: any) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function commonLoginRegister(props: Props): React.ComponentType {
<img
alt="Student auth"
className="img-fluid"
src={t.studentAuth}
src={t.studentAuthentication}
/>
</Link>
</div>
Expand All @@ -38,7 +38,7 @@ function commonLoginRegister(props: Props): React.ComponentType {
<img
alt="Professor auth"
className="img-fluid"
src={t.professorAuth}
src={t.professorAuthentication}
/>
</Link>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const studentAuth: string = 'https://storage.googleapis.com/ignitus_assets/ig-assets/studentAuthentication.svg';
export const professorAuth: string = 'https://storage.googleapis.com/ignitus_assets/ig-assets/professorAuthentication.svg';
export const studentAuthentication: string = 'https://storage.googleapis.com/ignitus_assets/ig-assets/studentAuthentication.svg';
export const professorAuthentication: string = 'https://storage.googleapis.com/ignitus_assets/ig-assets/professorAuthentication.svg';
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable jsx-a11y/aria-role */
/* eslint-disable react/prop-types */
import React, { useState } from 'react';
import { isEmpty } from '../../../ignitus-Shared/ignitus-Utilities/HelperFunctions/lodashHelpers';
import { withErrorBoundary } from '../../../ignitus-Shared/ignitus-ErrorHandlingComponents/errorBoundary';
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/* eslint-disable import/prefer-default-export */
export { default as Login } from './Login';
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import * as T from '../../ignitus-WelcomeFlow/Styles/style';
import * as C from '../Styles/style';

import { RoundedPrimaryButton } from '../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/buttons';
import { RoundedButton } from '../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/buttons';
import { withErrorBoundary } from '../../../../ignitus-Shared/ignitus-ErrorHandlingComponents/errorBoundary';

const EmailConfirmationFlow = () => (
Expand All @@ -26,9 +26,9 @@ const EmailConfirmationFlow = () => (
</C.TopMiddleSection>
</T.TopSection>
<C.BottomSection>
<RoundedPrimaryButton>
<RoundedButton size="large" category="primary">
<Link to="/">Get started</Link>
</RoundedPrimaryButton>
</RoundedButton>
</C.BottomSection>
</T.WelcomeContainer>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import {
import * as T from '../../ignitus-WelcomeFlow/Styles/style';
import * as C from '../Styles/style';
import {
PrimaryButton,
WhiteButton,
Button,
} from '../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/buttons';

const EmailFlow = () => (
Expand All @@ -33,12 +32,12 @@ const EmailFlow = () => (
</T.TopSection>
<T.BottomSection>
<C.ButtonContainer>
<PrimaryButton>
<Button size="large" category="primary">
<Link to="/flow/emailConfirmationFlow">Email confirmed</Link>
</PrimaryButton>
<WhiteButton>
</Button>
<Button size="large" category="white">
<Link to="/">I don’t see the email</Link>
</WhiteButton>
</Button>
</C.ButtonContainer>
<Paragraph><Link to="/">I don’t want to confirm my email yet.</Link></Paragraph>
</T.BottomSection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Paragraph,
Heading1,
} from '../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/typography';
import { RoundedPrimaryButton } from '../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/buttons';
import { RoundedButton } from '../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/buttons';
import { DefaultCheckbox } from '../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/ignitus-defaultCheckbox/Components';
import { withErrorBoundary } from '../../../../ignitus-Shared/ignitus-ErrorHandlingComponents/errorBoundary';

Expand Down Expand Up @@ -48,9 +48,9 @@ const InterestFlow = () => (
</C.RightSection>
</T.MiddleSection>
<T.BottomSection>
<RoundedPrimaryButton>
<RoundedButton size="large" category="primary">
<Link to="/flow/emailFlow">Save & Continue</Link>
</RoundedPrimaryButton>
</RoundedButton>
<Paragraph>
Skip for now
{' >> '}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, {useState} from 'react';
import PropTypes from 'prop-types';
import {
isEmpty,
isEqual,
Expand Down Expand Up @@ -79,13 +78,4 @@ const Signup = ({signUpRequest, studentSignUpData}) => {
);
};

Signup.propTypes = {
signUpRequest: PropTypes.func.isRequired,
studentSignUpData: PropTypes.shape({
isFetching: PropTypes.bool,
success: PropTypes.bool,
msg: PropTypes.string,
}).isRequired,
};

export default withErrorBoundary(Signup);

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const SIGN_UP_REQUEST: string = 'SIGN_UP_REQUEST';
export const SIGN_UP_RESPONSE: string = 'SIGN_UP_RESPONSE';
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from '../../../ignitus-Shared/ignitus-Utilities/HelperFunctions/lodashHelpers';
import * as t from './actionTypes';

export const signUpRequest = (email, password) => {
export const signUpRequest = (email: string, password: string) => {
if (!isString(email)) {
throw new Error(`email must be string: ${email}`);
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* eslint-disable import/prefer-default-export */
export const NAME = 'studentSignUpReducer';

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {createSelector} from 'reselect';
import {isObject} from '../../../ignitus-Shared/ignitus-Utilities/HelperFunctions/lodashHelpers';

export const selectStudentState = state => state.studentSignUpReducer;

export const makeSelectStudentData = () =>
createSelector(
selectStudentState,
substate => {
if (isObject(substate)) {
return substate;
}
return [];
},
);
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable import/extensions */
import React from 'react';
import { Link } from 'react-router-dom';
import { RoundedPrimaryButton } from '../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/buttons';
import { RoundedButton } from '../../../../ignitus-Shared/ignitus-DesignSystem/ignitus-Atoms/buttons';
import {
Paragraph,
Heading1,
Expand Down Expand Up @@ -46,9 +46,9 @@ const WelcomeFlow = () => (
</T.RightSection>
</T.MiddleSection>
<T.BottomSection>
<RoundedPrimaryButton>
<RoundedButton size="large" category="primary">
<Link to="/flow/interestFlow">Save & Continue</Link>
</RoundedPrimaryButton>
</RoundedButton>
<Paragraph>
Skip for now
{' >> '}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable react/prop-types */
/* eslint-disable jsx-a11y/anchor-is-valid */

/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable react/jsx-filename-extension */
/* eslint-disable jsx-a11y/anchor-is-valid */
/* eslint-disable react/prop-types */
import React from 'react';
import { Redirect, Link } from 'react-router-dom';
import { HashLink } from 'react-router-hash-link';
Expand Down
65 changes: 37 additions & 28 deletions src/ignitus-HomePage/ignitus-Testimonial/Components/Testimonial.jsx
Original file line number Diff line number Diff line change
@@ -1,57 +1,66 @@
/* eslint-disable default-case */
/* eslint-disable react/prop-types */
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
/* eslint-disable jsx-a11y/alt-text */
/* eslint-disable jsx-a11y/click-events-have-key-events */
/* eslint-disable jsx-a11y/no-static-element-interactions */

import React, { useState, useEffect } from 'react';
import { withErrorBoundary } from '../../../ignitus-Shared/ignitus-ErrorHandlingComponents/errorBoundary';

import '../Styles/style.scss';
import { Avatars } from '../constants';

const Testimonial = ({ testimonialData, getTestimonialData }) => {
const [currentIndex, setCurrentIndex] = useState(0);
const nextTestimonial = () => {
setCurrentIndex((previous) => {
if (previous === testimonialData.length - 1) {
return 0;
}
return previous + 1;
});
};
const handleClick = (event) => {
const { target: { id } } = event;

useEffect(() => {
getTestimonialData();
}, []);
switch (id) {
case '1':
setCurrentIndex(0);
break;

case '2':
setCurrentIndex(1);
break;

const prevTestimonial = () => {
let nextIndex = currentIndex - 1;
if (currentIndex === 0) {
nextIndex = testimonialData.length - 1;
case '3':
setCurrentIndex(2);
break;

case '4':
setCurrentIndex(3);
break;
}
setCurrentIndex(nextIndex);
};

useEffect(() => {
getTestimonialData();
}, []);

return (
<div className="testimonial">
<div className="testimonials-title">Testimonials</div>
<div className="testimonial-wrapper">
<div className="left-arrow arrow" onClick={prevTestimonial}>
<i className="fa fa-arrow-left" />
</div>
{testimonialData.length > 0 && (
<div className="carousel-content">
<p className="testimonial-text">
{testimonialData[currentIndex].description}
</p>
<p className="name">
{testimonialData[currentIndex].author}
</p>
<div className="text-box">
<p>{testimonialData[currentIndex].description}</p>
</div>
<div className="avatar">
<img src={Avatars[currentIndex]} />
</div>
<p className="name">{testimonialData[currentIndex].author}</p>
<p className="designation">
{testimonialData[currentIndex].authorDesignation}
</p>
</div>
)}
<div className="right-arrow arrow" onClick={nextTestimonial}>
<i className="fa fa-arrow-right" />
<div className="nav-avatar">
<img id="1" src={Avatars[0]} alt="" onClick={handleClick} />
<img id="2" src={Avatars[1]} alt="" onClick={handleClick} />
<img id="3" src={Avatars[2]} alt="" onClick={handleClick} />
<img id="4" src={Avatars[3]} alt="" onClick={handleClick} />
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit bab14f6

Please sign in to comment.