-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(issue-3133): hide player matches if player profile is private
- Loading branch information
Showing
5 changed files
with
116 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import styled from 'styled-components'; | ||
import Button from '@material-ui/core/Button'; | ||
import LockIcon from '@material-ui/icons/Lock'; | ||
import config from '../../../config'; | ||
|
||
const Styled = styled.div` | ||
text-align: center; | ||
padding-top: 5%; | ||
.playerProfilePrivateTitle { | ||
font-size: 2rem; | ||
margin-bottom: 1%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
.lockIcon { | ||
font-size: 1.8rem; | ||
margin-right: 2%; | ||
} | ||
.playerProfilePrivateDescription { | ||
margin-bottom: 2%; | ||
} | ||
.signInWithSteamButton { | ||
border: solid 1px #FFFFFF; | ||
color: #FFFFFF; | ||
padding: 1% 2%; | ||
} | ||
` | ||
|
||
const PlayerProfilePrivate = ({ strings }) => { | ||
const handleButtonClick = () => window.location.href = `${config.VITE_API_HOST}/login` | ||
|
||
return ( | ||
<Styled> | ||
<div> | ||
<div className="playerProfilePrivateTitle"> | ||
<LockIcon className="lockIcon" /> | ||
<div>{(strings.player_profile_private_title)}</div> | ||
</div> | ||
<div className="playerProfilePrivateDescription">{strings.player_profile_private_description}</div> | ||
<Button | ||
className="signInWithSteamButton" | ||
onClick={handleButtonClick} | ||
> | ||
{strings.sign_in_with_steam} | ||
</Button> | ||
</div> | ||
</Styled> | ||
); | ||
} | ||
|
||
PlayerProfilePrivate.PropTypes = { | ||
strings: PropTypes.shape({}), | ||
} | ||
|
||
const mapStateToProps = state => ({ | ||
strings: state.app.strings, | ||
}) | ||
|
||
export default connect(mapStateToProps)(PlayerProfilePrivate); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters