2024-02-03 20:23:31 -07:00
|
|
|
import React from "react";
|
2024-02-07 15:39:11 -08:00
|
|
|
import { StyleSheet, Text, View } from "react-native";
|
2024-02-06 15:08:19 -08:00
|
|
|
import { graph_data_two_measures } from "../../test/mock/charts/mock-data";
|
2024-02-07 15:39:11 -08:00
|
|
|
import SignOutButton from "../component/buttons/sign-out";
|
2024-02-06 15:12:54 -08:00
|
|
|
import BarGraph from "../component/charts/bar-graph/bar-graph";
|
2024-02-07 15:39:11 -08:00
|
|
|
import { useAuth } from "../context";
|
|
|
|
import { useAuthHeader } from "../graphql/client";
|
2024-01-31 15:55:33 -08:00
|
|
|
|
|
|
|
// Session Mock - can be used for session summary screen using a query handler component
|
|
|
|
// BarGraph component using mocked data currently
|
|
|
|
export default function SessionScreen() {
|
2024-02-07 15:39:11 -08:00
|
|
|
const { user } = useAuth();
|
|
|
|
const { authHeader } = useAuthHeader();
|
|
|
|
|
2024-02-03 20:23:31 -07:00
|
|
|
return (
|
|
|
|
<View style={StyleSheet.absoluteFill}>
|
|
|
|
<BarGraph data={graph_data_two_measures} />
|
2024-02-07 15:39:11 -08:00
|
|
|
|
|
|
|
{user && (
|
|
|
|
<>
|
|
|
|
<Text style={{ marginTop: 10 }}>
|
|
|
|
Display name: {user?.displayName}
|
|
|
|
</Text>
|
|
|
|
<Text>Phone number: {user?.phoneNumber}</Text>
|
|
|
|
</>
|
|
|
|
)}
|
|
|
|
<SignOutButton />
|
|
|
|
<Text>
|
|
|
|
{authHeader.key}: {authHeader.value}
|
|
|
|
</Text>
|
2024-02-03 20:23:31 -07:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|