Skip to content
Snippets Groups Projects
Commit f2a69daf authored by insert's avatar insert
Browse files

Fix onboarding.

parent fd03c64d
Branches
No related merge requests found
......@@ -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");
......
......@@ -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);
......
......@@ -116,7 +116,7 @@ function Context({ auth, children }: Props) {
if (onboarding) {
openScreen({
id: "onboarding",
callback: (username: string) =>
callback: async (username: string) =>
onboarding(username, true).then(login),
});
} else {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment