remove something wrong from props before passing it to recoveryKeyModal
This commit is contained in:
parent
6e26dc1792
commit
9dfca18451
|
@ -11,7 +11,7 @@ interface Props {
|
|||
onHide: () => void;
|
||||
somethingWentWrong: any;
|
||||
}
|
||||
function RecoveryKeyModal(props: Props) {
|
||||
function RecoveryKeyModal({ somethingWentWrong, ...props }: Props) {
|
||||
const [recoveryKey, setRecoveryKey] = useState(null);
|
||||
useEffect(() => {
|
||||
if (!props.show) {
|
||||
|
@ -20,7 +20,7 @@ function RecoveryKeyModal(props: Props) {
|
|||
const main = async () => {
|
||||
const recoveryKey = await getRecoveryKey();
|
||||
if (!recoveryKey) {
|
||||
props.somethingWentWrong();
|
||||
somethingWentWrong();
|
||||
props.onHide();
|
||||
}
|
||||
setRecoveryKey(recoveryKey);
|
||||
|
|
Loading…
Reference in a new issue