From 17893a0cfd8bac764abc059ed6d3e84b888db2e1 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Sun, 28 Apr 2024 20:34:07 -0500 Subject: [PATCH] CE-882 Put userId (email...) in context --- src/App.tsx | 3 ++- src/QContext.tsx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 6891b44..c622670 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -664,10 +664,10 @@ export default function App() const [dotMenuOpen, setDotMenuOpen] = useState(false); const [keyboardHelpOpen, setKeyboardHelpOpen] = useState(false); const [helpHelpActive] = useState(queryParams.has("helpHelp")); + const [userId] = useState(user.email); const [googleAnalyticsUtils] = useState(new GoogleAnalyticsUtils()); - /******************************************************************************* ** *******************************************************************************/ @@ -689,6 +689,7 @@ export default function App() dotMenuOpen: dotMenuOpen, keyboardHelpOpen: keyboardHelpOpen, helpHelpActive: helpHelpActive, + userId: userId, setPageHeader: (header: string | JSX.Element) => setPageHeader(header), setAccentColor: (accentColor: string) => setAccentColor(accentColor), setAccentColorLight: (accentColorLight: string) => setAccentColorLight(accentColorLight), diff --git a/src/QContext.tsx b/src/QContext.tsx index 88db98d..f80c366 100644 --- a/src/QContext.tsx +++ b/src/QContext.tsx @@ -59,6 +59,7 @@ interface QContext pathToLabelMap?: {[path: string]: string}; branding?: QBrandingMetaData; helpHelpActive?: boolean; + userId?: string; } const defaultState = {