In progress sign in changes.
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import { BrowserRouter } from "react-router-dom";
|
||||
|
||||
import { ApolloProvider } from "react-apollo";
|
||||
import { createHttpLink } from "apollo-link-http";
|
||||
import { InMemoryCache } from "apollo-cache-inmemory";
|
||||
import { ApolloClient } from "apollo-boost";
|
||||
import { typeDefs, resolvers } from "./graphql/resolvers";
|
||||
// require('dotenv').config()
|
||||
|
||||
import * as serviceWorker from "./serviceWorker";
|
||||
|
||||
import "./index.css";
|
||||
import App from "./App";
|
||||
import { default as App } from "./App/App.container";
|
||||
|
||||
const httpLink = createHttpLink({
|
||||
uri: "https://bodyshop-dev-db.herokuapp.com/v1/graphql"
|
||||
@@ -20,13 +22,14 @@ const cache = new InMemoryCache();
|
||||
|
||||
const client = new ApolloClient({
|
||||
link: httpLink,
|
||||
cache
|
||||
cache,
|
||||
typeDefs,
|
||||
resolvers
|
||||
});
|
||||
|
||||
client.writeData({
|
||||
data: {
|
||||
cartHidden: true,
|
||||
cartItems: []
|
||||
currentUser: null
|
||||
}
|
||||
});
|
||||
|
||||
@@ -39,7 +42,4 @@ ReactDOM.render(
|
||||
document.getElementById("root")
|
||||
);
|
||||
|
||||
// If you want your app to work offline and load faster, you can change
|
||||
// unregister() to register() below. Note this comes with some pitfalls.
|
||||
// Learn more about service workers: https://bit.ly/CRA-PWA
|
||||
serviceWorker.register();
|
||||
|
||||
Reference in New Issue
Block a user