1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

AudioPlayer initial

This commit is contained in:
Fedor Katurov 2019-10-13 17:47:13 +07:00
parent d1e369f723
commit f66825a9ea
12 changed files with 190 additions and 26 deletions

View file

@ -1,9 +1,8 @@
import React, { FC, useCallback, useEffect } from 'react';
import React, { FC, useCallback } from 'react';
import { connect } from 'react-redux';
import { push as historyPush } from 'connected-react-router';
import { Link } from 'react-router-dom';
import { Logo } from '~/components/main/Logo';
import { Player } from '~/utils/player';
import * as style from './style.scss';
import { Filler } from '~/components/containers/Filler';
@ -11,8 +10,11 @@ import { selectUser } from '~/redux/auth/selectors';
import { Group } from '~/components/containers/Group';
import * as MODAL_ACTIONS from '~/redux/modal/actions';
import { DIALOGS } from '~/redux/modal/constants';
import { pick } from 'ramda';
const mapStateToProps = selectUser;
const mapStateToProps = state => ({
user: pick(['username', 'is_user'])(selectUser(state)),
});
const mapDispatchToProps = {
push: historyPush,
@ -21,14 +23,10 @@ const mapDispatchToProps = {
type IProps = ReturnType<typeof mapStateToProps> & typeof mapDispatchToProps & {};
const HeaderUnconnected: FC<IProps> = ({ username, is_user, showDialog }) => {
const HeaderUnconnected: FC<IProps> = ({ user: { username, is_user }, showDialog }) => {
const onLogin = useCallback(() => showDialog(DIALOGS.LOGIN), [showDialog]);
const onOpenEditor = useCallback(() => showDialog(DIALOGS.EDITOR), [showDialog]);
useEffect(() => {
console.log({ Player });
}, []);
return (
<div className={style.container}>
<Logo />