Fix bug where reloading initial setup page,
would cause an exception
This commit is contained in:
parent
b1f911d29c
commit
467ec54797
|
@ -3,9 +3,9 @@ import gql from 'graphql-tag'
|
|||
import { Mutation, Query } from 'react-apollo'
|
||||
import { Redirect } from 'react-router-dom'
|
||||
import { Button, Form, Message, Header } from 'semantic-ui-react'
|
||||
import { Container } from './LoginPage'
|
||||
import { Container } from './loginUtilities'
|
||||
|
||||
import { checkInitialSetupQuery, login } from './loginUtilFunctions'
|
||||
import { checkInitialSetupQuery, login } from './loginUtilities'
|
||||
import { authToken } from '../../authentication'
|
||||
|
||||
const initialSetupMutation = gql`
|
||||
|
|
|
@ -3,14 +3,8 @@ import gql from 'graphql-tag'
|
|||
import { Mutation, Query } from 'react-apollo'
|
||||
import { Redirect } from 'react-router-dom'
|
||||
import styled from 'styled-components'
|
||||
import {
|
||||
Button,
|
||||
Form,
|
||||
Message,
|
||||
Container as SemanticContainer,
|
||||
Header,
|
||||
} from 'semantic-ui-react'
|
||||
import { checkInitialSetupQuery, login } from './loginUtilFunctions'
|
||||
import { Button, Form, Message, Header } from 'semantic-ui-react'
|
||||
import { checkInitialSetupQuery, login, Container } from './loginUtilities'
|
||||
import { authToken } from '../../authentication'
|
||||
|
||||
import logoPath from '../../assets/photoview-logo.svg'
|
||||
|
@ -25,10 +19,6 @@ const authorizeMutation = gql`
|
|||
}
|
||||
`
|
||||
|
||||
export const Container = styled(SemanticContainer)`
|
||||
margin-top: 80px;
|
||||
`
|
||||
|
||||
const StyledLogo = styled.img`
|
||||
max-height: 128px;
|
||||
`
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import gql from 'graphql-tag'
|
||||
import { saveTokenCookie } from '../../authentication'
|
||||
import styled from 'styled-components'
|
||||
import { Container as SemanticContainer } from 'semantic-ui-react'
|
||||
|
||||
export const checkInitialSetupQuery = gql`
|
||||
query CheckInitialSetup {
|
||||
|
@ -13,3 +15,7 @@ export function login(token) {
|
|||
saveTokenCookie(token)
|
||||
window.location = '/'
|
||||
}
|
||||
|
||||
export const Container = styled(SemanticContainer)`
|
||||
margin-top: 80px;
|
||||
`
|
Loading…
Reference in New Issue