text: import React from 'react';
  import {
    ApolloClient,
    InMemoryCache,
    ApolloProvider,
    createHttpLink,
  } from '@apollo/client';
  import { setContext } from '@apollo/client/link/context';
  import { BrowserRouter as Router, Route } from 'react-router-dom';
  
  import NavBar from './components/NavBar';
  //import ProjectForm from './components/ProjectForm';
  import Login from './pages/Login';
  import Signup from './pages/Signup';
  import UploadForm from './pages/UploadForm';
  import ExploreNFTs from './pages/ExploreNFTs';
  import Contact from './pages/Contact';
  // Construct our main GraphQL API endpoint
  const httpLink = createHttpLink({
    uri: '/graphql',
  });
  
  //Construct request middleware that will attach the JWT token to every request as an `authorization` header
  const authLink = setContext((_, { headers }) => {
    // get the authentication token from local storage if it exists
    const token = localStorage.getItem('id_token');
    // return the headers to the context so httpLink can read them
    return {
      headers: {
        ...headers,
        authorization: token ? `Bearer ${token}` : '',
      },
    };
  });
  
  const client = new ApolloClient({
    // Set up our client to execute the `authLink` middleware prior to making the request to our GraphQL API
    link: authLink.concat(httpLink),
    cache: new InMemoryCache(),
  });
  
  function App() {
    return (
      <ApolloProvider client={client}>
        <Router>
          <NavBar />
          <div className="container">
            <Route exact path="/explore">
              <ExploreNFTs />
            </Route>
            <Route exact path="/share">
              <UploadForm />
            </Route>
            <Route exact path="/contact">
              <Contact />
            </Route>
            <Route exact path ="/login">
              <Login />
            </Route>
            <Route exact path="/signUp">
              <Signup />
            </Route>
          </div>
        </Router>
      </ApolloProvider>
    )
  }
  
  export default App;