Skip to content

Commit

Permalink
fix(front): autoreload bug (#366)
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Kelen <erskelen@gmail.com>
  • Loading branch information
ekelen authored Jul 9, 2020
1 parent ae6ccc7 commit db26847
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions web/src/store/GlobalStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,13 @@ import {
} from 'lodash'
import React, { useReducer } from 'react'
import { retrieveAuthCookie } from '../api/cookies'
import {
actions,
PROJECT,
} from '../constants'
import { actions, PROJECT } from '../constants'

export const GlobalContext = React.createContext()

export const INITIAL_STATE = {
apiKey: retrieveAuthCookie() || null,
authIsPending: false,
autoRefreshOn: false,
builds: [],
error: null,
isAuthed: false,
Expand Down Expand Up @@ -78,7 +74,6 @@ function reducer(state, action) {
export const GlobalStore = ({ children }) => {
const [state, dispatch] = useReducer(reducer, INITIAL_STATE)


// custom actions can go here; for now we just have one
// 🚧 not cool, we need to split this so we don't get redundant re-renders
// or have to do a slow deep equality check to prevent it
Expand Down
2 changes: 1 addition & 1 deletion web/src/ui/pages/Home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const Home = () => {
style={{ backgroundColor: theme.bg.block }}
/>
</div>
{state.showingDisclaimerModal && (
{showingDisclaimerModal && (
<ProtocolDisclaimer closeAction={() => setDisclaimerAccepted(true)} />
)}
{!showingFilterModal && state.isAuthed && (
Expand Down

0 comments on commit db26847

Please sign in to comment.