added env vars types and start scripts

This commit is contained in:
Andy Malkin
2024-02-05 22:48:29 -08:00
parent 43ff5d416a
commit b88f5bf2e4
9 changed files with 47 additions and 18 deletions

View File

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