Skip to content

Commit c19e3ce

Browse files
committed
textarea added
1 parent c09bd14 commit c19e3ce

2 files changed

Lines changed: 21 additions & 11 deletions

File tree

src/component/modals/ContributeDetails.jsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ const ContributeDetails = ({ superState, dispatcher }) => {
2525
// console.log(process.env.Token);
2626
toast.success(result.data?.message);
2727
} catch (error) {
28-
toast.error(error.response.data.message);
28+
if (error?.response?.status === 400) {
29+
toast.info(error?.response?.data?.message);
30+
} else {
31+
toast.error(error?.response.data.message);
32+
}
2933
}
3034
toast.dismiss(id);
3135
closeModal();
@@ -59,22 +63,22 @@ const ContributeDetails = ({ superState, dispatcher }) => {
5963
onChange={(e) => setAuth(e.target.value)}
6064
required
6165
/>
62-
<span>Branch Name</span>
63-
<input
64-
value={branch}
65-
onChange={(e) => setBranch(e.target.value)}
66-
required
67-
/>
6866
{showAdvanceOptions && (
6967
<>
70-
<span>PR Title</span>
68+
<span>Branch Name</span>
69+
<input
70+
value={branch}
71+
onChange={(e) => setBranch(e.target.value)}
72+
required
73+
/>
74+
<span>Title of Study</span>
7175
<input
7276
value={title}
7377
onChange={(e) => setTitle(e.target.value)}
7478
required
7579
/>
76-
<span>PR Description</span>
77-
<input
80+
<span>Description of Study</span>
81+
<textarea
7882
value={desc}
7983
onChange={(e) => setDesc(e.target.value)}
8084
required

src/component/modals/contributeDetails.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@
2121
.contribute-details .btn-secondary{
2222
align-self: flex-end;
2323
}
24+
.contribute-details textarea{
25+
resize: vertical;
26+
max-height: 200px;
27+
max-width: 300px;
28+
text-align: left;
29+
max-lines: 10;
30+
}
2431
.Toastify__toast-container {
2532
/* width: 350px; */
2633
/* height: 80px; */
27-
margin-right: 20px;
2834
padding: 3px 15px;
2935
display: inline-block;
3036
}

0 commit comments

Comments
 (0)