Skip to content

Commit

Permalink
fix: submit application button should not be a link
Browse files Browse the repository at this point in the history
Redirection to the success page is handled when the mutation succeeds
  • Loading branch information
matthieu-foucault committed Mar 2, 2021
1 parent cf41d0e commit 6af1a39
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions app/components/SubmitApplication.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import {createFragmentContainer, graphql, RelayProp} from 'react-relay';
import {useRouter} from 'next/router';
import Link from 'next/link';
import {Button} from 'react-bootstrap';
import {CiipApplicationRevisionStatus} from 'createApplicationRevisionStatusMutation.graphql';
import createApplicationRevisionStatusMutation from 'mutations/application/createApplicationRevisionStatusMutation';
Expand Down Expand Up @@ -38,20 +37,13 @@ export const SubmitApplicationComponent: React.FunctionComponent<Props> = (
};

return (
<Link
passHref
href={{
pathname: '/reporter/complete-submit'
}}
<Button
className="float-right"
style={{marginTop: '10px'}}
onClick={submitApplication}
>
<Button
className="float-right"
style={{marginTop: '10px'}}
onClick={submitApplication}
>
Submit Application
</Button>
</Link>
Submit Application
</Button>
);
};

Expand Down

0 comments on commit 6af1a39

Please sign in to comment.