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

Commit

Permalink
Progressbar (#585)
Browse files Browse the repository at this point in the history
* all the " cancel" button link to p2  landing page

* add progress bar for pages
  • Loading branch information
DianeLiu2019 authored and sleepycat committed Aug 20, 2019
1 parent 8359cbb commit 1ba8859
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/p2/ConfirmationPage.js
Expand Up @@ -43,7 +43,7 @@ export const ConfirmationPage = () => {
flexDirection="row"
marginBottom="20px"
>
<Steps activeStep={4} steps={[{}, {}, {}, {}, {}]} />
<Steps activeStep={5} steps={[{}, {}, {}, {}, {}, {}]} />
</Container>
<H1>
<Trans>Review your report</Trans>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/p2/ContactInfoPage.js
Expand Up @@ -23,8 +23,9 @@ export const ContactInfoPage = () => (
flexDirection="row"
marginBottom="20px"
>
<Steps activeStep={4} steps={[{}, {}, {}, {}, {}]} />
<Steps activeStep={4} steps={[{}, {}, {}, {}, {}, {}]} />
</Container>

<H1>
<Trans>Leave your contact information</Trans>
</H1>
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/p2/ImpactStatementPage.js
Expand Up @@ -6,6 +6,8 @@ import { Trans } from '@lingui/macro'
import { H1 } from '../components/header'
import { P } from '../components/paragraph'
import { Layout } from '../components/layout'
import { Container } from '../components/container'
import { Steps } from '../components/stepper'
import { ImpactStatementInfoForm } from './forms/ImpactStatementInfoForm'
import { TrackPageViews } from '../TrackPageViews'
import { getDoneForms } from '../utils/queriesAndMutations'
Expand All @@ -17,6 +19,14 @@ const submitAndNavigate = (client, data) => {

export const ImpactStatementPage = () => (
<Layout>
<Container
display="flex"
width="90%"
flexDirection="row"
marginBottom="20px"
>
<Steps activeStep={3} steps={[{}, {}, {}, {}, {}, {}]} />
</Container>
<H1>
<Trans>Impact caused by the scam</Trans>
</H1>
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/p2/ScammerDetailsPage.js
Expand Up @@ -4,6 +4,8 @@ import { navigate } from '@reach/router'
import { Trans } from '@lingui/macro'
import { H1 } from '../components/header'
import { P } from '../components/paragraph'
import { Container } from '../components/container'
import { Steps } from '../components/stepper'
import { TrackPageViews } from '../TrackPageViews'
import { ScammerDetailsForm } from './forms/ScammerDetailsForm'
import { Layout } from '../components/layout'
Expand All @@ -17,6 +19,14 @@ const submitAndNavigate = (client, data) => {
export const ScammerDetailsPage = () => {
return (
<Layout>
<Container
display="flex"
width="90%"
flexDirection="row"
marginBottom="20px"
>
<Steps activeStep={2} steps={[{}, {}, {}, {}, {}, {}]} />
</Container>
<H1>
<Trans>About the scammer</Trans>
</H1>
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/p2/TimeFramePage.js
Expand Up @@ -7,6 +7,8 @@ import { Layout } from '../components/layout'
import { TimeFrameInfoForm } from './forms/TimeFrameInfoForm'
import { TrackPageViews } from '../TrackPageViews'
import { getDoneForms } from '../utils/queriesAndMutations'
import { Container } from '../components/container'
import { Steps } from '../components/stepper'

const submitAndNavigate = (client, data) => {
client.writeData({ data: { timeFrame: JSON.stringify(data) } })
Expand All @@ -15,6 +17,14 @@ const submitAndNavigate = (client, data) => {

export const TimeFramePage = () => (
<Layout>
<Container
display="flex"
width="90%"
flexDirection="row"
marginBottom="20px"
>
<Steps activeStep={0} steps={[{}, {}, {}, {}, {}, {}]} />
</Container>
<H1>
<Trans>When did it happen?</Trans>
</H1>
Expand Down
11 changes: 11 additions & 0 deletions frontend/src/p2/WhatHappenedPage.js
Expand Up @@ -6,6 +6,8 @@ import { H1 } from '../components/header'
import { P } from '../components/paragraph'
import { Ul } from '../components/unordered-list'
import { Li } from '../components/list-item'
import { Container } from '../components/container'
import { Steps } from '../components/stepper'
import { TrackPageViews } from '../TrackPageViews'
import { WhatHappenedForm } from './forms/WhatHappenedForm'
import { Layout } from '../components/layout'
Expand All @@ -18,6 +20,15 @@ const submitAndNavigate = (client, data) => {

export const WhatHappenedPage = () => (
<Layout>
<Container
display="flex"
width="90%"
flexDirection="row"
marginBottom="20px"
>
<Steps activeStep={1} steps={[{}, {}, {}, {}, {}, {}]} />
</Container>

<H1>
<Trans>Describe what happened</Trans>
</H1>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/p2/forms/ContactInfoForm.js
Expand Up @@ -99,7 +99,7 @@ export const ContactInfoForm = ({ onSubmit }) => (
>
<Button
type="submit"
onClick={() => navigate('/p1/confirmation')}
onClick={() => navigate('/p2/confirmation')}
>
<Trans>Continue</Trans>
</Button>
Expand All @@ -114,7 +114,7 @@ export const ContactInfoForm = ({ onSubmit }) => (
justify-content: space-between;
`}
>
<Link type="button" color="black" to="/p1/" textAlign="center">
<Link type="button" color="black" to="/p2/" textAlign="center">
<Trans>Cancel report</Trans>
</Link>
</Container>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/p2/forms/TimeFrameInfoForm.js
Expand Up @@ -116,7 +116,7 @@ class TimeFrameInfoFormWrapped extends Component {
justify-content: space-between;
`}
>
<Link type="button" color="black" to="/p1/" textAlign="center">
<Link type="button" color="black" to="/p2/" textAlign="center">
<Trans>Cancel report</Trans>
</Link>
</Container>
Expand Down

0 comments on commit 1ba8859

Please sign in to comment.