added env vars types and start scripts
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
InMemoryCache,
|
||||
from,
|
||||
} from "@apollo/client";
|
||||
import { API_URI } from "@env";
|
||||
|
||||
import React, {
|
||||
ReactNode,
|
||||
createContext,
|
||||
@@ -15,6 +15,8 @@ import React, {
|
||||
useState,
|
||||
} from "react";
|
||||
|
||||
import { apiUrl } from '../config'
|
||||
|
||||
type Props = {
|
||||
children: ReactNode;
|
||||
};
|
||||
@@ -40,9 +42,9 @@ export const useAuthHeader = () => {
|
||||
|
||||
export const ClientProvider: React.FC<Props> = ({ children }) => {
|
||||
const [authHeader, setAuthHeader] = useState({ key: "", value: "" });
|
||||
console.log(`The api uri is ${API_URI}`);
|
||||
console.log(`The api uri is ${apiUrl}`);
|
||||
const httpLink = new HttpLink({
|
||||
uri: API_URI,
|
||||
uri: apiUrl,
|
||||
});
|
||||
const cache = new InMemoryCache({});
|
||||
|
||||
|
Reference in New Issue
Block a user