We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40a6f18 commit 3595154Copy full SHA for 3595154
1 file changed
web-frontend/src/App.jsx
@@ -3,12 +3,20 @@ import { useNavigate } from "react-router";
3
import { useAuth } from "./context/AuthContext";
4
import HeaderBar from "./components/HeaderBar";
5
import Landing from "./components/Landing";
6
+import { datadogRum } from '@datadog/browser-rum';
7
import "./App.css";
8
9
function App() {
- const { isAuthenticated, isLoading } = useAuth();
10
+ const { isAuthenticated, isLoading, user } = useAuth();
11
const navigate = useNavigate();
12
13
+ if (isAuthenticated) {
14
+ datadogRum.setUser({
15
+ name: user.preferred_username,
16
+ email: user.email
17
+ })
18
+ }
19
+
20
useEffect(() => {
21
if (!isLoading && isAuthenticated) {
22
navigate("/dashboard");
0 commit comments