Skip to content

Commit 6a3684b

Browse files
committed
Disabled instrospection
Fixed issue with project submissions allowing multiple submissions if clicking fast enough Added .finally to async call sequence on submissionForm to set isSubmitting to false when all promises settle onSubmit
1 parent 4d62249 commit 6a3684b

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

backend/modules/graphql.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ module.exports = app => {
8080
const server = new ApolloServer({
8181
schema,
8282
playground: false,
83-
// TODO make instrospection false in production
84-
introspection: true,
83+
introspection: false,
8584
context: ({ req, res }) => ({
8685
req,
8786
res,

frontend/src/components/inputs/BottomBar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ const BottomBar = ({
9797
<Button
9898
color="theme_white"
9999
variant="contained"
100+
disabled={loading}
100101
onClick={onSubmit}
101102
>
102103
{submitLabel}

frontend/src/pages/_dashboard/renderDashboard/participant/project/SubmissionForm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,9 @@ const SubmissionForm = props => {
327327
autoHideDuration: 3000,
328328
}),
329329
)
330+
} finally {
331+
actions.setSubmitting(false)
330332
}
331-
332-
actions.setSubmitting(false)
333333
}}
334334
>
335335
{renderForm}

0 commit comments

Comments
 (0)