Skip to content

Commit 81f42ae

Browse files
DaltonMcauliffeAdrianC113AragonJ13
committed
Linking to the sign in page on a disabled request form
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]>
1 parent d12029a commit 81f42ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pages/requests/new/[ware].js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { default as BsForm } from 'react-bootstrap/Form'
33
import Form from '@rjsf/core'
44
import validator from '@rjsf/validator-ajv8'
55
import { useRouter } from 'next/router'
6+
import { signIn } from 'next-auth/react'
67
import {
78
AdditionalInfo,
89
BlankRequestForm,
@@ -22,6 +23,7 @@ import {
2223
sendRequestToVendor,
2324
useInitializeRequest,
2425
useOneWare,
26+
2527
} from '../../../utils'
2628

2729
const NewRequest = ({ session }) => {
@@ -266,7 +268,7 @@ const SignInRequired = () => (
266268
<Notice
267269
addClass='mt-5'
268270
alert={{
269-
body: ['To proceed with making a request, please log in to your account.'],
271+
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>],
270272
title: 'Sign in required',
271273
variant: 'info'
272274
}}

0 commit comments

Comments
 (0)