Display login button on all pages (#909)

main
Andrew Dassonville 5 years ago committed by Michael Fix
parent 99abac7ae5
commit 31de1df62f

@ -4,7 +4,6 @@ import { useAsyncCallback } from 'actionsack'
import Editor from './Editor' import Editor from './Editor'
import Toasts from './Toasts' import Toasts from './Toasts'
import LoginButton from './LoginButton'
import { useAPI } from './ApiContext' import { useAPI } from './ApiContext'
import { useAuth } from './AuthContext' import { useAuth } from './AuthContext'
@ -102,18 +101,6 @@ function EditorContainer(props) {
return ( return (
<> <>
<div className="login-button-container">
<LoginButton />
<style jsx>
{`
.login-button-container {
position: absolute;
top: 1.4rem;
right: 1rem;
}
`}
</style>
</div>
<Toasts toasts={toasts} /> <Toasts toasts={toasts} />
<Editor <Editor
{...props} {...props}

@ -87,7 +87,7 @@ function LoginButton({ isVisible, toggleVisibility }) {
height: 100%; height: 100%;
} }
div :global(.profile-button) { div :global(.profile-button) {
max-width: 142px; max-width: 218px;
min-height: 40px; min-height: 40px;
} }
span { span {

@ -4,6 +4,7 @@ import Meta from './Meta'
import Header from './Header' import Header from './Header'
import Footer from './Footer' import Footer from './Footer'
import Announcement from './Announcement' import Announcement from './Announcement'
import LoginButton from './LoginButton'
const COLUMN = ` const COLUMN = `
display: flex; display: flex;
@ -20,6 +21,9 @@ class Page extends React.Component {
<AuthContext> <AuthContext>
<Announcement /> <Announcement />
<Header enableHeroText={enableHeroText} /> <Header enableHeroText={enableHeroText} />
<div className="login-button-container">
<LoginButton />
</div>
<div className="page">{children}</div> <div className="page">{children}</div>
</AuthContext> </AuthContext>
@ -30,6 +34,11 @@ class Page extends React.Component {
.main { .main {
${flex ? COLUMN : ''} ${flex ? COLUMN : ''}
} }
.login-button-container {
position: absolute;
top: 1.4rem;
right: 1rem;
}
@media (min-width: 1024px) { @media (min-width: 1024px) {
.main { .main {
${COLUMN}; ${COLUMN};

Loading…
Cancel
Save