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

Remove full page load link from confirm/[token] page #2248

Merged
merged 4 commits into from
Sep 4, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion __tests__/pages/__snapshots__/reset.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ exports[`ResetPassword Page Should render confirm success on success 1`] = `
<a
class="btn btn-primary btn-lg mb-3"
href="/curriculum"
role="button"
>
Continue to dashboard
</a>
Expand Down
7 changes: 4 additions & 3 deletions pages/confirm/[token].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useMutation } from '@apollo/client'
import React from 'react'
import { useRouter } from 'next/router'
import { Formik, Form, Field } from 'formik'
import Link from 'next/link'
import UPDATE_PASSWORD from '../../graphql/queries/updatePassword'
import NavLink from '../../components/NavLink'
import Input from '../../components/Input'
Expand All @@ -16,9 +17,9 @@ const initialValues = {

const ConfirmSuccess: React.FC = () => (
<Card type="success" title="Password has been set!">
<a className="btn btn-primary btn-lg mb-3" role="button" href="/curriculum">
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems like screen readers should view this as a link rather than a button, so I removed role="button".

Continue to dashboard
</a>
<Link href="/curriculum">
<a className="btn btn-primary btn-lg mb-3">Continue to dashboard</a>
</Link>
</Card>
)

Expand Down