2020-08-03 14:18:48 +00:00
|
|
|
import React from "react";
|
|
|
|
|
import { Link } from "react-router-dom";
|
|
|
|
|
import { connect } from "react-redux";
|
|
|
|
|
import { getCurrentUser } from "selectors/usersSelectors";
|
|
|
|
|
import styled from "styled-components";
|
|
|
|
|
import StyledHeader from "components/designSystems/appsmith/StyledHeader";
|
|
|
|
|
import { AppState } from "reducers";
|
|
|
|
|
import { BASE_URL } from "constants/routes";
|
2020-08-18 06:40:11 +00:00
|
|
|
import { Colors } from "constants/Colors";
|
|
|
|
|
import AppsmithLogo from "assets/images/appsmith_logo_white.png";
|
2020-08-03 14:18:48 +00:00
|
|
|
|
|
|
|
|
const StyledPageHeader = styled(StyledHeader)`
|
|
|
|
|
width: 100%;
|
2020-08-18 06:40:11 +00:00
|
|
|
height: 48px;
|
|
|
|
|
background: ${Colors.BALTIC_SEA};
|
2020-08-03 14:18:48 +00:00
|
|
|
display: flex;
|
2021-01-28 07:20:09 +00:00
|
|
|
justify-content: center;
|
2020-08-18 06:40:11 +00:00
|
|
|
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.05);
|
2020-12-24 04:32:25 +00:00
|
|
|
padding: 0px ${(props) => props.theme.spaces[12]};
|
2020-08-03 14:18:48 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const LogoContainer = styled.div`
|
|
|
|
|
.logoimg {
|
2020-08-18 06:40:11 +00:00
|
|
|
max-width: 110px;
|
2020-08-03 14:18:48 +00:00
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const LoginHeader = () => {
|
|
|
|
|
return (
|
|
|
|
|
<StyledPageHeader>
|
|
|
|
|
<LogoContainer>
|
|
|
|
|
<Link to={BASE_URL}>
|
2020-10-19 13:34:55 +00:00
|
|
|
<img
|
|
|
|
|
className="logoimg t--Appsmith-logo-image"
|
|
|
|
|
src={AppsmithLogo}
|
|
|
|
|
alt="Appsmith Logo"
|
|
|
|
|
/>
|
2020-08-03 14:18:48 +00:00
|
|
|
</Link>
|
|
|
|
|
</LogoContainer>
|
|
|
|
|
</StyledPageHeader>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const mapStateToProps = (state: AppState) => ({
|
|
|
|
|
user: getCurrentUser(state),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps)(LoginHeader);
|