Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
Add HashLinks to workshop form and modified project section
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishek-kumar09 committed Sep 26, 2020
1 parent b386c70 commit 76fa24e
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/components/SidePanel/Projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const useStyles = makeStyles(theme => ({
}
}));

function Projects({title, projects, flat }) {
function Projects({ title, projects, flat }) {
const classes = useStyles();

return (
Expand Down
5 changes: 4 additions & 1 deletion src/views/pages/Courses/Major.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ export default function Major({ course }) {

<Hidden smDown>
<Box display="flex" flexDirection="column" mb={3} ml={2}>
<Projects title="Learn To Make From This Course" projects={course.projects} />
<Projects
title="Learn To Make From This Course"
projects={course.projects}
/>
</Box>
</Hidden>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion src/views/pages/HomeView/CTA.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function CTA({ className, ...rest }) {
<Button
className={classes.Button + ' ' + classes.primeBtn}
component="a"
href="https://codecau.se/ws"
href="/workshops"
target="_blank"
size="large"
variant="contained"
Expand Down
2 changes: 1 addition & 1 deletion src/views/pages/HomeView/Hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Hero({ className, ...rest }) {
return (
<div className={className} {...rest}>
<HeroWithLogo
style={{height: "420px"}}
style={{ height: '420px' }}
title="Learn for Cause"
title2="Code for Cause"
imageUrl="/static/home/codeforcause.svg"
Expand Down
15 changes: 7 additions & 8 deletions src/views/pages/WorkshopView/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function Form({ ...rest }) {
We will be able to recommend, and will be able to notify you about our
events of your interest near you.
</Typography>
<Typography className={classes.subhead} variant="body1" color="primary">
<Typography className={classes.subhead} variant="h6" color="primary">
Contact Information
</Typography>
<ValidatorForm onSubmit={handleSubmit}>
Expand Down Expand Up @@ -190,11 +190,7 @@ function Form({ ...rest }) {
]}
/>

<Typography
className={classes.subhead}
variant="body1"
color="primary"
>
<Typography className={classes.subhead} variant="h6" color="primary">
Workshop Information
</Typography>

Expand All @@ -210,16 +206,19 @@ function Form({ ...rest }) {
validators={['required']}
errorMessages={['This is a required field']}
/>

<Typography variant="caption">Referred Date For Workshop</Typography>
<MuiPickersUtilsProvider utils={DateFnsUtils}>
<KeyboardDatePicker
disableToolbar
variant="outlined"
variant="filled"
format="MM/dd/yyyy"
minDate={new Date()}
margin="normal"
id="date-picker-inline"
fullWidth
label="Referred Date for Workshop"
autoOk
autoSave
value={selectedDate}
onChange={handleDateChange}
KeyboardButtonProps={{
Expand Down
7 changes: 6 additions & 1 deletion src/views/pages/WorkshopView/Hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import RegisterWorkshop from './RegisterWorkshop';
import HeroWithOneButton from '../../../components/Hero/HeroWithOneButton';
import { verticalGradient } from '../../../constants';
import { makeStyles } from '@material-ui/core';
import { HashLink as Link } from 'react-router-hash-link';

const useStyles = makeStyles(() => ({
root: {
Expand All @@ -18,7 +19,11 @@ function Hero({ className, ...rest }) {
title="A Workshop With An Experienced Tech Team"
subtitle="122+ workshops done till now!"
className={classes.root}
component={<RegisterWorkshop />}
component={
<Link smooth to="#fill-the-workshop-form">
<RegisterWorkshop />
</Link>
}
/>
);
}
Expand Down
3 changes: 2 additions & 1 deletion src/views/pages/WorkshopView/RegisterWorkshop.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import React from 'react';
import ButtonComponent from '../../../components/Button/ButtonComponent';
import { HashLink as Link } from 'react-router-hash-link';

const webinarApplicationUrl =
'https://docs.google.com/forms/d/e/1FAIpQLSck4rCrdf4VCfnuHuv9CKcyVKLq0MpA132OQhktlJxwxqrdHw/viewform';

function RegisterWorkshopButton({ className }) {
return (
<ButtonComponent
className={className}
title="Fill Form For Workshop"
className={className}
href={webinarApplicationUrl}
target="_blank"
/>
Expand Down
7 changes: 5 additions & 2 deletions src/views/pages/WorkshopView/WorkshopContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@ export default function WorkshopContent({ details }) {
<HeadWithBulletPoints
details={details.must_do}
></HeadWithBulletPoints>
<Form />
<Form id="fill-the-workshop-form" />
</Box>

<Hidden smDown>
<Box display="flex" flexDirection="column" mb={3} ml={2}>
<Projects title="Our Previous Workshops" projects={details.projects} />
<Projects
title="Our Previous Workshops"
projects={details.projects}
/>
</Box>
</Hidden>
</Box>
Expand Down

0 comments on commit 76fa24e

Please sign in to comment.