Fix onboarding.

This commit is contained in:
Paul
2021-07-25 13:55:45 +01:00
parent 1271c29117
commit 1d4546ea03
3 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ export interface Props {
export default function Modals({ screen, openScreen }: Props) {
const onClose = () =>
isModalClosing
isModalClosing || screen.id === "onboarding"
? openScreen({ id: "none" })
: internalEmit("Modal", "close");

View File

@@ -28,7 +28,7 @@ export function OnboardingModal({ onClose, callback }: Props) {
const onSubmit: SubmitHandler<FormInputs> = ({ username }) => {
setLoading(true);
callback(username, true)
.then(onClose)
.then(() => onClose())
.catch((err: any) => {
setError(takeError(err));
setLoading(false);