Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
greg
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
it-bott-integrasjoner
greg
Commits
a217e067
Commit
a217e067
authored
3 years ago
by
Tore.Brede
Browse files
Options
Downloads
Patches
Plain Diff
The submitState state is not used, so removing it
parent
1194e19c
No related branches found
No related tags found
1 merge request
!202
GREG-139: Feedback for guest registration error
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/routes/guest/register/index.tsx
+0
-16
0 additions, 16 deletions
frontend/src/routes/guest/register/index.tsx
with
0 additions
and
16 deletions
frontend/src/routes/guest/register/index.tsx
+
0
−
16
View file @
a217e067
...
...
@@ -25,12 +25,6 @@ import ServerErrorReport, {
ErrorReportProps
,
}
from
'
../../../components/errorReport
'
enum
SubmitState
{
NotSubmitted
,
Submitted
,
SubmittedError
,
}
enum
Step
{
RegisterStep
,
ConsentStep
,
...
...
@@ -75,11 +69,6 @@ export default function GuestRegister() {
const
guestRegisterRef
=
useRef
<
GuestRegisterCallableMethods
>
(
null
)
const
guestConsentRef
=
useRef
<
GuestRegisterCallableMethods
>
(
null
)
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const
[
submitState
,
setSubmitState
]
=
useState
<
SubmitState
>
(
SubmitState
.
NotSubmitted
)
const
[
activeStep
,
setActiveStep
]
=
useState
(
0
)
const
[
initialGuestData
,
setInitialGuestData
]
=
...
...
@@ -286,7 +275,6 @@ export default function GuestRegister() {
fetch
(
'
/api/ui/v1/invited/
'
,
submitJsonOpts
(
'
POST
'
,
payload
))
.
then
((
response
)
=>
{
if
(
response
.
ok
)
{
setSubmitState
(
SubmitState
.
Submitted
)
setActiveStep
(
Step
.
SuccessStep
)
}
else
{
// Expect that the error will contain JSON-data in the body
...
...
@@ -313,9 +301,6 @@ export default function GuestRegister() {
errorBodyText
:
undefined
,
})
})
.
finally
(()
=>
{
setSubmitState
(
SubmitState
.
SubmittedError
)
})
}
})
.
catch
((
error
)
=>
{
...
...
@@ -326,7 +311,6 @@ export default function GuestRegister() {
statusText
:
undefined
,
errorBodyText
:
undefined
,
})
setSubmitState
(
SubmitState
.
SubmittedError
)
console
.
error
(
error
)
})
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment