mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
submit bar
This commit is contained in:
parent
6bb24fc869
commit
3fdf14d680
10 changed files with 131 additions and 24 deletions
|
@ -1,15 +1,24 @@
|
|||
import React, { FC } from 'react';
|
||||
import * as styles from './styles.scss';
|
||||
import { PlayerBar } from '~/components/bars/PlayerBar';
|
||||
import { SubmitBar } from '~/components/bars/SubmitBar';
|
||||
import { selectUser } from '~/redux/auth/selectors';
|
||||
import pick from 'ramda/es/pick';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
interface IProps {}
|
||||
const mapStateToProps = state => pick(['is_user'], selectUser(state));
|
||||
|
||||
const BottomContainer: FC<IProps> = ({}) => (
|
||||
type IProps = ReturnType<typeof mapStateToProps> & {};
|
||||
|
||||
const BottomContainerUnconnected: FC<IProps> = ({ is_user }) => (
|
||||
<div className={styles.wrap}>
|
||||
<div className={styles.content}>
|
||||
<PlayerBar />
|
||||
|
||||
{is_user && <SubmitBar />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
const BottomContainer = connect(mapStateToProps)(BottomContainerUnconnected);
|
||||
export { BottomContainer };
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
bottom: 0;
|
||||
pointer-events: none;
|
||||
touch-action: none;
|
||||
height: 64px;
|
||||
height: $bar_height;
|
||||
display: flex;
|
||||
z-index: 10;
|
||||
width: 100%;
|
||||
|
@ -18,7 +18,7 @@
|
|||
.content {
|
||||
position: relative;
|
||||
flex: 0 1 $content_width;
|
||||
height: 48px;
|
||||
height: $bar_height;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
|
||||
@include tablet {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue