Skip to content

Commit f61295a

Browse files
committed
simplify return by moving notice back to its own component
1 parent 3e15444 commit f61295a

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

pages/requests/new/[ware].js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,7 @@ const NewRequest = ({ session }) => {
171171
return(
172172
<>
173173
{disabled &&
174-
<Notice
175-
addClass='mt-5'
176-
alert={{
177-
body: ['To proceed with making a request, please log in to your account.'],
178-
title: 'Sign in required',
179-
variant: 'info'
180-
}}
181-
dismissible={false}
182-
/>
174+
<SignInRequired />
183175
}
184176
<div className='container'>
185177
<Title title={dynamicForm.name || ''} addClass='my-4' />
@@ -260,5 +252,16 @@ const StandardRequestOptions = ({ buttonDisabled, defaultRequiredDate, requestFo
260252

261253
const pageLoading = <Loading wrapperClass='item-page mt-5' />
262254

255+
const SignInRequired = () => (
256+
<Notice
257+
addClass='mt-5'
258+
alert={{
259+
body: ['To proceed with making a request, please log in to your account.'],
260+
title: 'Sign in required',
261+
variant: 'info'
262+
}}
263+
dismissible={false}
264+
/>
265+
)
263266

264267
export default NewRequest

0 commit comments

Comments
 (0)