@@ -127,106 +127,99 @@ export default function TransferHackaroonsPage({
127127
128128 return (
129129 < >
130- < div className = "h-screen grid place-content-center" >
131- { /* Container for "Transfer Hackeroons" Content */ }
132- < div className = "h-[80vh] w-[80vw] max-w-[70vh] rounded-xl p-5 border border-black shadow-xl grid place-content-center" >
133- < form onSubmit = { handleSubmit } >
134- < h1 className = "text-center text-2xl md:text-3xl lg:text-4xl" >
135- Transferring Hackeroons to{ " " }
136- < span className = "font-bold whitespace-nowrap" >
137- { user . name }
138- </ span >
139- </ h1 >
140- < div className = "grid place-content-center" >
141- { reason === "unknown" && (
142- < div className = "flex flex-col w-[60vw] max-w-[50vh] mt-4 md:text-sm lg:text-md" >
143- < span className = "text-red-600" >
144- I have disabled Unknown for non-admins
145- as it
146- { "'" } s been causing issues with our
147- systems and makes it difficult to
148- understand transactions. If you{ "'" } re
149- trying to give a user Hackeroons for
150- attending an event, please make an event
151- code for them and have them enter it. If
152- you have a legitimate need, please copy
153- the URL in the address bar and send a
154- message to Jonah discussing it.
155- </ span >
156- </ div >
157- ) }
158-
159- { /* Only show amount for transaction types with no prescribed value. */ }
160- { ! (
161- reasonTypeMap [ reason ] in
162- valuedTransactionAmounts
163- ) && (
164- < >
165- < div className = "flex flex-col w-[60vw] max-w-[50vh] mt-4 md:text-lg lg:text-xl" >
166- < label htmlFor = "amount" > Amount</ label >
167- < input
168- required
169- id = "amount"
170- type = "number"
171- min = { 0 }
172- step = { 5 }
173- value = { amount . toString ( ) }
174- className = "px-4 py-3 border border-black rounded-md"
175- onChange = { ( e ) =>
176- setAmount (
177- Number ( e . target . value ) ,
178- )
179- }
180- />
181- </ div >
182- </ >
183- ) }
184- < div className = "flex flex-col w-[60vw] max-w-[50vh] mt-4 md:text-lg lg:text-xl" >
185- < label htmlFor = "reason" > Reason</ label >
186- < select
187- id = "reason"
188- value = { reason }
189- className = "px-4 py-3 border border-black rounded-md"
190- onChange = { ( e ) =>
191- setReason (
192- e . target
193- . value as keyof typeof reasonTypeMap ,
194- )
195- }
196- >
197- { Object . keys ( reasonTypeMap )
198- . filter (
199- ( el ) =>
200- ! excludedTypes . includes (
201- el as keyof typeof reasonTypeMap ,
202- ) ,
203- )
204- . map ( ( key ) => (
205- < option key = { key } value = { key } >
206- {
207- reasonNameMap [
208- key as keyof typeof reasonTypeMap
209- ]
210- }
211- </ option >
212- ) ) }
213- </ select >
130+ { /* Container for "Transfer Hackeroons" Content */ }
131+ < div className = "w-[90vw] max-w-[700px] bg-white p-5 mx-auto my-2 rounded-xl border border-black grid place-content-center" >
132+ < form onSubmit = { handleSubmit } >
133+ < h1 className = "text-center text-2xl md:text-3xl lg:text-4xl" >
134+ Transferring Hackeroons to{ " " }
135+ < span className = "font-bold whitespace-nowrap" >
136+ { user . name }
137+ </ span >
138+ </ h1 >
139+ < div className = "grid place-content-center" >
140+ { reason === "unknown" && (
141+ < div className = "flex flex-col w-full mt-4 md:text-sm lg:text-md" >
142+ < span className = "text-red-600" >
143+ I have disabled Unknown for non-admins as it
144+ { "'" } s been causing issues with our systems
145+ and makes it difficult to understand
146+ transactions. If you{ "'" } re trying to give a
147+ user Hackeroons for attending an event,
148+ please make an event code for them and have
149+ them enter it. If you have a legitimate
150+ need, please copy the URL in the address bar
151+ and send a message to Jonah discussing it.
152+ </ span >
214153 </ div >
215- < input
216- className = "mt-4 py-3 bg-green-500 hover:bg-green-600 duration-200 rounded-md border border-black text-white cursor-pointer"
217- type = "submit"
218- />
219-
220- { /* exit button that returns user back to staff dashboard */ }
221- < Link
222- className = "mt-4 py-3 bg-red-500 hover:bg-red-600 duration-200 rounded-md border border-black text-white text-center cursor-pointer"
223- href = { `/dashboard/${ user . id } ` }
154+ ) }
155+
156+ { /* Only show amount for transaction types with no prescribed value. */ }
157+ { ! (
158+ reasonTypeMap [ reason ] in valuedTransactionAmounts
159+ ) && (
160+ < >
161+ < div className = "flex flex-col w-full mt-4 md:text-lg lg:text-xl" >
162+ < label htmlFor = "amount" > Amount</ label >
163+ < input
164+ required
165+ id = "amount"
166+ type = "number"
167+ min = { 0 }
168+ step = { 5 }
169+ value = { amount . toString ( ) }
170+ className = "px-4 py-3 border border-black rounded-md"
171+ onChange = { ( e ) =>
172+ setAmount ( Number ( e . target . value ) )
173+ }
174+ />
175+ </ div >
176+ </ >
177+ ) }
178+ < div className = "flex flex-col w-full mt-4 md:text-lg lg:text-xl" >
179+ < label htmlFor = "reason" > Reason</ label >
180+ < select
181+ id = "reason"
182+ value = { reason }
183+ className = "px-4 py-3 border border-black rounded-md"
184+ onChange = { ( e ) =>
185+ setReason (
186+ e . target
187+ . value as keyof typeof reasonTypeMap ,
188+ )
189+ }
224190 >
225- Exit
226- </ Link >
191+ { Object . keys ( reasonTypeMap )
192+ . filter (
193+ ( el ) =>
194+ ! excludedTypes . includes (
195+ el as keyof typeof reasonTypeMap ,
196+ ) ,
197+ )
198+ . map ( ( key ) => (
199+ < option key = { key } value = { key } >
200+ {
201+ reasonNameMap [
202+ key as keyof typeof reasonTypeMap
203+ ]
204+ }
205+ </ option >
206+ ) ) }
207+ </ select >
227208 </ div >
228- </ form >
229- </ div >
209+ < input
210+ className = "mt-4 py-3 bg-green-500 hover:bg-green-600 duration-200 rounded-md border border-black text-white cursor-pointer"
211+ type = "submit"
212+ />
213+
214+ { /* exit button that returns user back to staff dashboard */ }
215+ < Link
216+ className = "mt-4 py-3 bg-red-500 hover:bg-red-600 duration-200 rounded-md border border-black text-white text-center cursor-pointer"
217+ href = { `/dashboard/${ user . id } ` }
218+ >
219+ Exit
220+ </ Link >
221+ </ div >
222+ </ form >
230223 </ div >
231224
232225 < DashboardFeedback
0 commit comments