Skip to content

Commit 2dee014

Browse files
committed
remove setTimeout from processContributorRequest
1 parent ce92a03 commit 2dee014

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

packages/openneuro-app/src/scripts/dataset/components/dataset-event-item.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,10 @@ export const DatasetEventItem: React.FC<DatasetEventItemProps> = ({
7474
<ToastContent title="Contributor request processed successfully" />,
7575
)
7676
refetchEvents()
77-
78-
setTimeout(() => {
79-
setUpdatedNote("")
80-
if (editingNoteId === event.id) {
81-
startEditingNote(null, "")
82-
}
83-
}, 50)
77+
setUpdatedNote("")
78+
if (editingNoteId === event.id) {
79+
startEditingNote(null, "")
80+
}
8481
},
8582
onError: (error) => {
8683
Sentry.captureException(error)
@@ -141,7 +138,7 @@ export const DatasetEventItem: React.FC<DatasetEventItemProps> = ({
141138
{targetUserLoading ? <span>for ...</span> : targetUser
142139
? (
143140
<>
144-
for User: <Username user={targetUser} />
141+
{" "}for User: <Username user={targetUser} />
145142
</>
146143
)
147144
: event.event.targetUserId
@@ -219,11 +216,11 @@ export const DatasetEventItem: React.FC<DatasetEventItemProps> = ({
219216
return (
220217
<li>
221218
<div className="grid faux-table">
222-
<div className="col-lg col col-4">{renderNoteContent()}</div>
219+
<div className="col-lg col col-5">{renderNoteContent()}</div>
223220
<div className="col-lg col col-3">
224221
{new Date(event.timestamp).toLocaleString()}
225222
</div>
226-
<div className="col-lg col col-3">
223+
<div className="col-lg col col-2">
227224
<Username user={event.user} />
228225
</div>
229226
<div className="col-lg col col-2 text--right">

packages/openneuro-app/src/scripts/dataset/components/dataset-event-list.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ export const DatasetEventList: React.FC<DatasetEventListProps> = ({
4949
return (
5050
<>
5151
<div className="grid faux-table-header">
52-
<h4 className="col-lg col col-4">Note</h4>
52+
<h4 className="col-lg col col-5">Note</h4>
5353
<h4 className="col-lg col col-3">Date</h4>
54-
<h4 className="col-lg col col-3">Author</h4>
54+
<h4 className="col-lg col col-2">Author</h4>
5555
<h4 className="col-lg col col-2 text--right">Action</h4>
5656
</div>
5757
<ul>

0 commit comments

Comments
 (0)