Skip to content

Commit

Permalink
Linking to the sign in page on a disabled request form
Browse files Browse the repository at this point in the history
instead of only displaying text in the notice we converted the text 'please log in' to be a clickable link to log in
issue #383

Co-authored-by: Adrian Carranza <[email protected]>
Co-authored-by: Jean Aragon <[email protected]>
  • Loading branch information
3 people committed Feb 23, 2024
1 parent d12029a commit 81f42ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pages/requests/new/[ware].js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { default as BsForm } from 'react-bootstrap/Form'
import Form from '@rjsf/core'
import validator from '@rjsf/validator-ajv8'
import { useRouter } from 'next/router'
import { signIn } from 'next-auth/react'
import {
AdditionalInfo,
BlankRequestForm,
Expand All @@ -22,6 +23,7 @@ import {
sendRequestToVendor,
useInitializeRequest,
useOneWare,

} from '../../../utils'

const NewRequest = ({ session }) => {
Expand Down Expand Up @@ -266,7 +268,7 @@ const SignInRequired = () => (
<Notice
addClass='mt-5'
alert={{
body: ['To proceed with making a request, please log in to your account.'],
body: [<p>To proceed with making a request, <a href="#" onClick={() => signIn(process.env.NEXT_PUBLIC_PROVIDER_NAME)}>please log in</a> to your account.</p>],
title: 'Sign in required',
variant: 'info'
}}
Expand Down

0 comments on commit 81f42ae

Please sign in to comment.