Refactored header to pull from masterdata.

This commit is contained in:
Patrick Fic
2019-12-05 22:00:00 -08:00
parent 2842af38b7
commit 76b6b9c7b9
5 changed files with 96 additions and 73 deletions

View File

@@ -1,19 +1,20 @@
import React from "react";
import { ApolloProvider } from "react-apollo";
import { gql } from "apollo-boost";
import { HttpLink } from "apollo-link-http";
import { getMainDefinition } from "apollo-utilities";
import ApolloClient from "apollo-client";
import { InMemoryCache } from "apollo-cache-inmemory";
//Styling imports
import "./App.css";
import HeaderAppBar from "../components/header-app-bar/header-app-bar.component";
import HeaderAppBarContainer from "../components/header-app-bar/header-app-bar.container";
import SignIn from "../components/sign-in/sign-in.component";
import initialState from "../graphql/initial-state";
const graphqlEndpoint = process.env.REACT_APP_GRAPHQL_ENDPOINT || "https://bodyshop-dev-db.herokuapp.com/v1/graphql";
//Todo: Issue with this line. Not sure why.
const graphqlEndpoint =
process.env.REACT_APP_GRAPHQL_ENDPOINT ||
"https://bodyshop-dev-db.herokuapp.com/v1/graphql";
export default function App({ authState }) {
console.log("graphqlEndpoint", graphqlEndpoint);
@@ -36,10 +37,10 @@ export default function App({ authState }) {
data: initialState
});
console.log(client)
console.log(client);
return (
<ApolloProvider client={client}>
<HeaderAppBar />
<HeaderAppBarContainer />
<SignIn />
</ApolloProvider>
);