wip: token passed to headers, need to make hook for onAuthStateChanged
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,17 +15,19 @@ import React, {
|
||||
useState,
|
||||
} from "react";
|
||||
|
||||
import { API_URI } from '../config'
|
||||
|
||||
type Props = {
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
export const AuthHeaderContext = createContext<
|
||||
| {
|
||||
authHeader: { key: string; value: string };
|
||||
setAuthHeader: React.Dispatch<
|
||||
React.SetStateAction<{ key: string; value: string }>
|
||||
>;
|
||||
}
|
||||
authHeader: { key: string; value: string };
|
||||
setAuthHeader: React.Dispatch<
|
||||
React.SetStateAction<{ key: string; value: string }>
|
||||
>;
|
||||
}
|
||||
| undefined
|
||||
>(undefined);
|
||||
|
||||
|
Reference in New Issue
Block a user