From a9f474fa625d77f81a0fc8595e8ba3b65bd67a93 Mon Sep 17 00:00:00 2001 From: Loewy Date: Wed, 7 Feb 2024 17:33:27 -0800 Subject: [PATCH] revert screens, ready for pr --- src/context/auth-context.tsx | 5 ++--- src/screens/session.tsx | 21 +-------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/context/auth-context.tsx b/src/context/auth-context.tsx index 7db6f60..d8c6b53 100644 --- a/src/context/auth-context.tsx +++ b/src/context/auth-context.tsx @@ -1,7 +1,7 @@ import { DEV_USER_ID } from "@env"; import { FirebaseAuthTypes } from "@react-native-firebase/auth"; import React, { createContext, useContext, useEffect, useState } from "react"; -import { currentUser, handleSignOut, onAuthStateChanged } from "../auth"; +import { handleSignOut, onAuthStateChanged } from "../auth"; import { useAuthHeader } from "../graphql/client"; interface AuthContextType { @@ -46,7 +46,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ useEffect(() => { let unsubscribe = () => { - console.log("Dev mode unsubscribe - really dense fn"); + console.log("Dev Mode"); }; if (!DEV_USER_ID) { @@ -59,7 +59,6 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ useEffect(() => { const setAuthAsync = async () => { - console.log("running"); if (DEV_USER_ID) { console.log("Setting fake authorization user to: ", DEV_USER_ID); setAuthHeader({ key: "user_id", value: DEV_USER_ID }); diff --git a/src/screens/session.tsx b/src/screens/session.tsx index 2bedad4..e44b554 100644 --- a/src/screens/session.tsx +++ b/src/screens/session.tsx @@ -1,33 +1,14 @@ import React from "react"; -import { StyleSheet, Text, View } from "react-native"; +import { StyleSheet, View } from "react-native"; import { graph_data_two_measures } from "../../test/mock/charts/mock-data"; -import SignOutButton from "../component/buttons/sign-out"; import BarGraph from "../component/charts/bar-graph/bar-graph"; -import { useAuth } from "../context"; -import { useAuthHeader } from "../graphql/client"; // Session Mock - can be used for session summary screen using a query handler component // BarGraph component using mocked data currently export default function SessionScreen() { - const { user } = useAuth(); - const { authHeader } = useAuthHeader(); - return ( - - {user && ( - <> - - Display name: {user?.displayName} - - Phone number: {user?.phoneNumber} - - )} - - - {authHeader.key}: {authHeader.value} - ); }