In progress sign in changes.

This commit is contained in:
Patrick Fic
2019-12-04 21:02:23 -07:00
parent 25d434ef10
commit b2649a25cc
8 changed files with 203 additions and 23 deletions

View File

@@ -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();