mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
made saga open register dialog
This commit is contained in:
parent
837b4ee6f3
commit
f1463ed5ea
6 changed files with 19 additions and 13 deletions
|
@ -28,7 +28,7 @@ const mapDispatchToProps = {
|
|||
userSetLoginError: ACTIONS.userSetLoginError,
|
||||
authLoginWithSocial: ACTIONS.authLoginWithSocial,
|
||||
modalShowDialog: MODAL_ACTIONS.modalShowDialog,
|
||||
authGotOauthEvent: ACTIONS.authGotOauthEvent,
|
||||
authGotOauthLoginEvent: ACTIONS.authGotOauthLoginEvent,
|
||||
};
|
||||
|
||||
type IProps = ReturnType<typeof mapStateToProps> & typeof mapDispatchToProps & IDialogProps & {};
|
||||
|
@ -39,9 +39,8 @@ const LoginDialogUnconnected: FC<IProps> = ({
|
|||
onRequestClose,
|
||||
userSendLoginRequest,
|
||||
userSetLoginError,
|
||||
authLoginWithSocial,
|
||||
modalShowDialog,
|
||||
authGotOauthEvent,
|
||||
authGotOauthLoginEvent,
|
||||
}) => {
|
||||
const [username, setUserName] = useState('');
|
||||
const [password, setPassword] = useState('');
|
||||
|
@ -76,9 +75,9 @@ const LoginDialogUnconnected: FC<IProps> = ({
|
|||
return;
|
||||
}
|
||||
|
||||
authGotOauthEvent(event.data);
|
||||
authGotOauthLoginEvent(event.data);
|
||||
},
|
||||
[authGotOauthEvent]
|
||||
[authGotOauthLoginEvent]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -7,13 +7,14 @@ import { DialogTitle } from '~/components/dialogs/DialogTitle';
|
|||
import { Group } from '~/components/containers/Group';
|
||||
import { InputText } from '~/components/input/InputText';
|
||||
import styles from './styles.scss';
|
||||
import { selectAuthRegisterSocial } from '~/redux/auth/selectors';
|
||||
|
||||
const mapStateToProps = () => ({});
|
||||
const mapStateToProps = selectAuthRegisterSocial;
|
||||
const mapDispatchToProps = {};
|
||||
|
||||
type Props = ReturnType<typeof mapStateToProps> & typeof mapDispatchToProps & IDialogProps & {};
|
||||
|
||||
const LoginSocialRegisterDialogUnconnected: FC<Props> = ({ onRequestClose }) => {
|
||||
const LoginSocialRegisterDialogUnconnected: FC<Props> = ({ onRequestClose, token }) => {
|
||||
const [username, setUsername] = useState('');
|
||||
|
||||
return (
|
||||
|
@ -22,6 +23,7 @@ const LoginSocialRegisterDialogUnconnected: FC<Props> = ({ onRequestClose }) =>
|
|||
<div className={styles.wrap}>
|
||||
<Group>
|
||||
<DialogTitle>Добро пожаловать в семью!</DialogTitle>
|
||||
<InputText handler={setUsername} value={token} title="Token" />
|
||||
<InputText handler={setUsername} value={username} title="Юзернэйм" />
|
||||
<InputText handler={setUsername} value={username} title="Пароль" type="password" />
|
||||
</Group>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue