From 89b964fef687db2a6ec349c206fc23a979991b11 Mon Sep 17 00:00:00 2001 From: Carter Date: Fri, 7 Mar 2025 15:18:30 -0600 Subject: [PATCH] setting default team to view as when user is first loaded --- src/app/UserWrapper.tsx | 2 +- src/teams/TeamList.tsx | 3 ++- src/user/UserMenu.tsx | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/UserWrapper.tsx b/src/app/UserWrapper.tsx index 0c6ff41..80960d4 100644 --- a/src/app/UserWrapper.tsx +++ b/src/app/UserWrapper.tsx @@ -73,7 +73,7 @@ export default function UserWrapper(props: Props) { setGlobal({ user: resp.data.user ? User.create(resp.data.user) : User.create(), team: resp.data.team ? Team.create(resp.data.team) : Team.create(), - as: "", + as: resp.data.user?.settings?.useTeam === true ? resp.data.user.settings.defaultTeam : "", showErrors: false, userTeamPermissions: [], backgroundTasksComplete: false, diff --git a/src/teams/TeamList.tsx b/src/teams/TeamList.tsx index 4f0c431..021cfc2 100644 --- a/src/teams/TeamList.tsx +++ b/src/teams/TeamList.tsx @@ -43,12 +43,13 @@ const useStyles = makeStyles((theme: Theme) => ({ width: theme.spacing(6), height: theme.spacing(6), marginTop: "auto", - marginBottom: "auto" + marginBottom: "auto", }, titleBox: { display: "flex", alignItems: "center", marginLeft: theme.spacing(1), + width: "100%" } })) diff --git a/src/user/UserMenu.tsx b/src/user/UserMenu.tsx index 6233d7d..2139b2c 100644 --- a/src/user/UserMenu.tsx +++ b/src/user/UserMenu.tsx @@ -5,7 +5,6 @@ import { makeStyles } from "@mui/styles"; import { LockOpen, Person, Lock, Settings, SupervisedUserCircle as TeamIcon, ExitToApp, PersonAdd } from "@mui/icons-material"; import { useState } from "react"; import UserTeamName from "./UserTeamName"; -import React from "react"; import ThemeIcon from "../common/ThemeIcon"; import { useAuth0 } from "@auth0/auth0-react"; import UserSettings from "./UserSettings"; @@ -150,7 +149,7 @@ export default function UserMenu(props: Props) { const unauthenticatedUserMenu = () => { return ( - + <>