Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix login bg && add welcome text #941

Merged
merged 7 commits into from
Mar 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: sign up provider err
  • Loading branch information
walle233 committed Mar 20, 2023
commit 2791a6ff7a0d0cdb23d0b375215ba93281a505d6
7 changes: 5 additions & 2 deletions web/src/pages/auth/signup/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from "react";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { useNavigate } from "react-router-dom";
import { ViewIcon, ViewOffIcon } from "@chakra-ui/icons";
Expand Down Expand Up @@ -38,13 +38,16 @@ export default function SignUp() {

useGetProvidersQuery((data: any) => {
setProviders(data?.data || []);
});

useEffect(() => {
if (providers.length) {
const passwordProvider = providers.find((provider) => provider.name === "user-password");
if (passwordProvider) {
setIsNeedPhone(passwordProvider.bind?.phone === "required");
}
}
});
}, [providers]);

const { showSuccess, showError } = useGlobalStore();
const navigate = useNavigate();
Expand Down