mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed features at editor
This commit is contained in:
parent
85ee879c2f
commit
393813ce4e
9 changed files with 204 additions and 163 deletions
|
@ -1,28 +1,38 @@
|
|||
import * as React from 'react';
|
||||
import * as React from "react";
|
||||
import { Logo } from "~/components/main/Logo";
|
||||
import { connect } from 'react-redux';
|
||||
import { connect } from "react-redux";
|
||||
import { IUserState } from "~/redux/user/reducer";
|
||||
import { push as historyPush } from 'connected-react-router';
|
||||
import { push as historyPush } from "connected-react-router";
|
||||
|
||||
import * as style from './style.scss';
|
||||
import {Filler} from "~/components/containers/Filler";
|
||||
import {Group} from "~/components/containers/Group";
|
||||
import { Link } from 'react-router-dom';
|
||||
import * as style from "./style.scss";
|
||||
import { Filler } from "~/components/containers/Filler";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
const mapStateToProps = ({
|
||||
user: {
|
||||
profile: { username, is_user }
|
||||
}
|
||||
}: {
|
||||
user: IUserState;
|
||||
}) => ({ username, is_user });
|
||||
|
||||
const mapStateToProps = ({ user: { profile: { username, is_user } } }: { user: IUserState }) => ({ username, is_user });
|
||||
const mapDispatchToProps = {
|
||||
push: historyPush,
|
||||
push: historyPush
|
||||
};
|
||||
|
||||
type IHeaderProps = ReturnType<typeof mapStateToProps> & typeof mapDispatchToProps & {};
|
||||
type IHeaderProps = ReturnType<typeof mapStateToProps> &
|
||||
typeof mapDispatchToProps & {};
|
||||
|
||||
export const Component: React.FunctionComponent<IHeaderProps> = ({ username, is_user }) => {
|
||||
export const Component: React.FunctionComponent<IHeaderProps> = ({
|
||||
username,
|
||||
is_user
|
||||
}) => {
|
||||
return (
|
||||
<div className="default_container head_container">
|
||||
<div className={style.container}>
|
||||
<Logo/>
|
||||
<Logo />
|
||||
|
||||
<Filler/>
|
||||
<Filler />
|
||||
|
||||
<div className={style.plugs}>
|
||||
<Link to="/">flow</Link>
|
||||
|
@ -31,15 +41,18 @@ export const Component: React.FunctionComponent<IHeaderProps> = ({ username, is_
|
|||
<Link to="/examples/horizontal">horizontal</Link>
|
||||
</div>
|
||||
|
||||
<Filler/>
|
||||
<Filler />
|
||||
|
||||
<Group horizontal className={style.user_button}>
|
||||
{/* <Group horizontal className={style.user_button}>
|
||||
<div>username</div>
|
||||
<div className={style.user_avatar}/>
|
||||
</Group>
|
||||
</Group> */}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export const Header = connect(mapStateToProps, mapDispatchToProps)(Component);
|
||||
export const Header = connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(Component);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue