Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
parity-signer-companion
Commits
8a7e71ff
Unverified
Commit
8a7e71ff
authored
Oct 21, 2021
by
Andrei Eres
Committed by
GitHub
Oct 21, 2021
Browse files
Improve UI feedback on importing (#81)
parent
6d88a72a
Pipeline
#163092
passed with stages
in 1 minute and 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/stores/headerActions.ts
View file @
8a7e71ff
...
...
@@ -11,11 +11,16 @@ export const importHeaderAction: Action = {
onAction
:
goToImport
,
}
export
const
g
oHomeHeaderAction
:
Action
=
{
export
const
cancelAndG
oHomeHeaderAction
:
Action
=
{
label
:
'
Cancel
'
,
onAction
:
goHome
,
}
export
const
doneAndGoHomeHeaderAction
:
Action
=
{
label
:
'
Done
'
,
onAction
:
goHome
,
}
export
const
headerActions
=
createStore
<
Action
[]
>
(()
=>
{
headerActions
.
set
([])
})
...
...
src/ui/accounts/ImportQr.tsx
View file @
8a7e71ff
...
...
@@ -4,7 +4,8 @@ import styled from 'styled-components'
import
Address
from
'
../components/Address
'
import
{
addHeaderAction
,
goHomeHeaderAction
,
cancelAndGoHomeHeaderAction
,
doneAndGoHomeHeaderAction
,
resetHeaderActions
,
}
from
'
../../stores/headerActions
'
import
{
BaseProps
}
from
'
../types
'
...
...
@@ -37,9 +38,11 @@ const ImportQr: React.FC<BaseProps> = ({ className }) => {
}
useEffect
(()
=>
{
addHeaderAction
(
goHomeHeaderAction
)
scanned
.
length
===
0
?
addHeaderAction
(
cancelAndGoHomeHeaderAction
)
:
addHeaderAction
(
doneAndGoHomeHeaderAction
)
return
()
=>
resetHeaderActions
()
},
[])
},
[
scanned
.
length
])
return
(
<
div
className
=
{
className
}
>
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment