Bug fixes for deployment

This commit is contained in:
Barry Low committed 2018-10-10 21:15:51 -07:00
1 parent c98455d5b8
commit 9f09f33b8c
12 files changed
+2528 -4351

No files matched your search

+30 -33
View File
@@ -1,5 +1,4 @@
import { ApolloClient } from 'apollo-client'
import { ApolloProvider } from 'react-apollo'
import { HttpLink } from 'apollo-link-http'
import { InMemoryCache } from 'apollo-cache-inmemory'
import { ApolloLink, split, Observable } from 'apollo-link'
@@ -150,38 +149,36 @@ class App extends Component {
render () {
return (
<BrowserRouter>
<ApolloProvider client={client}>
<MuiThemeProvider theme={theme}>
<CssBaseline />
<div className='App'>
<NavBar auth={auth} />
<Switch>
<Route exact path='/' component={Home} />
<Route exact path='/about' component={About} />
<Route exact path='/teams' component={Teams} />
<Route exact path='/teams/:slug' component={Teams} />
<Route
exact
path='/(dashboard|manage-teams|team-members|financial-beings|settings)/'
render={props => <Dashboard {...props} auth={auth} />}
/>
<Route
path='/callback'
render={props => {
auth.handleAuthentication(props)
return <Callback {...props} />
}}
/>
<Route
exact
path='/activate-team-membership'
render={props => <AcceptTeamInvite {...props} auth={auth} />}
/>
</Switch>
<Footer />
</div>
</MuiThemeProvider>
</ApolloProvider>
<MuiThemeProvider theme={theme}>
<CssBaseline />
<div className='App'>
<NavBar auth={auth} />
<Switch>
<Route exact path='/' component={Home} />
<Route exact path='/about' component={About} />
<Route exact path='/teams' component={Teams} />
<Route exact path='/teams/:slug' component={Teams} />
<Route
exact
path='/(dashboard|manage-teams|team-members|financial-beings|settings)/'
render={props => <Dashboard {...props} auth={auth} />}
/>
<Route
path='/callback'
render={props => {
auth.handleAuthentication(props)
return <Callback {...props} />
}}
/>
<Route
exact
path='/activate-team-membership'
render={props => <AcceptTeamInvite {...props} auth={auth} />}
/>
</Switch>
<Footer />
</div>
</MuiThemeProvider>
</BrowserRouter>
)
}
+2
View File
@@ -24,3 +24,5 @@ if (process.env.NODE_ENV === 'development') {
})
}
}
export default App
@@ -209,7 +209,7 @@ export class CreateTeamDialog extends Component {
e.preventDefault()
console.log('createTeam submit: ', name, botName)
const slug = this.slugify(name)
const botSlug = this.slugify(name)
const botSlug = this.slugify(botName)
await createTeam({ variables: { name, slug, botName, botSlug } })
this.setState({ name: '', open: false })
}
@@ -125,12 +125,12 @@ export class ManageTeamEdit extends Component {
}
let avatar = null
if (this.state.avatar !== null) avatar = this.state.avatar
if (team.profile !== null && team.profile.avatar !== undefined && team.profile.avatar !== null) avatar = team.profile.avatar
if (this.state.avatar !== null) avatar = this.state.avatar
if (this.state.avatar === null && team.profile !== null && team.profile.avatar === undefined) avatar = 'https://algobotcommstorage.blob.core.windows.net/aateammodule/aa-avatar-default.png'
let banner = null
if (this.state.banner !== null) banner = this.state.banner
if (team.profile !== null && team.profile.banner !== undefined && team.profile.banner !== null) banner = team.profile.banner
if (this.state.banner !== null) banner = this.state.banner
if (this.state.banner === null && team.profile !== null && team.profile.banner === undefined) banner = 'https://algobotcommstorage.blob.core.windows.net/aateammodule/aa-banner-default.png'
console.log('team images: ', avatar, banner)