mirror of
https://github.com/FranP-code/Hangman-game-with-React.git
synced 2025-10-13 00:42:32 +00:00
28 lines
783 B
JavaScript
28 lines
783 B
JavaScript
import React from 'react'
|
|
import {withRouter} from 'react-router'
|
|
import AccountPreview from '../Account/AccountPreview/AccountPreview'
|
|
|
|
const AdminHeader = (props) => {
|
|
return (
|
|
<header className={props.demo === true ? 'demo' : null}>
|
|
{
|
|
props.demo === true ? <h1>Admin Place <span className='demoSpan'>Demo!</span></h1> : <h1>Admin Place</h1>
|
|
}
|
|
<button
|
|
className="redirect-button"
|
|
onClick={() => props.history.push('/')}
|
|
>
|
|
Back to the Game
|
|
</button>
|
|
|
|
{
|
|
!props.demo ?
|
|
<AccountPreview />
|
|
: null
|
|
}
|
|
</header>
|
|
)
|
|
}
|
|
|
|
export default withRouter(AdminHeader)
|