setting default team to view as when user is first loaded
This commit is contained in:
parent
d19d37410e
commit
89b964fef6
3 changed files with 5 additions and 5 deletions
|
|
@ -73,7 +73,7 @@ export default function UserWrapper(props: Props) {
|
||||||
setGlobal({
|
setGlobal({
|
||||||
user: resp.data.user ? User.create(resp.data.user) : User.create(),
|
user: resp.data.user ? User.create(resp.data.user) : User.create(),
|
||||||
team: resp.data.team ? Team.create(resp.data.team) : Team.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,
|
showErrors: false,
|
||||||
userTeamPermissions: [],
|
userTeamPermissions: [],
|
||||||
backgroundTasksComplete: false,
|
backgroundTasksComplete: false,
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,13 @@ const useStyles = makeStyles((theme: Theme) => ({
|
||||||
width: theme.spacing(6),
|
width: theme.spacing(6),
|
||||||
height: theme.spacing(6),
|
height: theme.spacing(6),
|
||||||
marginTop: "auto",
|
marginTop: "auto",
|
||||||
marginBottom: "auto"
|
marginBottom: "auto",
|
||||||
},
|
},
|
||||||
titleBox: {
|
titleBox: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
marginLeft: theme.spacing(1),
|
marginLeft: theme.spacing(1),
|
||||||
|
width: "100%"
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { makeStyles } from "@mui/styles";
|
||||||
import { LockOpen, Person, Lock, Settings, SupervisedUserCircle as TeamIcon, ExitToApp, PersonAdd } from "@mui/icons-material";
|
import { LockOpen, Person, Lock, Settings, SupervisedUserCircle as TeamIcon, ExitToApp, PersonAdd } from "@mui/icons-material";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import UserTeamName from "./UserTeamName";
|
import UserTeamName from "./UserTeamName";
|
||||||
import React from "react";
|
|
||||||
import ThemeIcon from "../common/ThemeIcon";
|
import ThemeIcon from "../common/ThemeIcon";
|
||||||
import { useAuth0 } from "@auth0/auth0-react";
|
import { useAuth0 } from "@auth0/auth0-react";
|
||||||
import UserSettings from "./UserSettings";
|
import UserSettings from "./UserSettings";
|
||||||
|
|
@ -150,7 +149,7 @@ export default function UserMenu(props: Props) {
|
||||||
|
|
||||||
const unauthenticatedUserMenu = () => {
|
const unauthenticatedUserMenu = () => {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
aria-label="Sign In"
|
aria-label="Sign In"
|
||||||
|
|
@ -171,7 +170,7 @@ export default function UserMenu(props: Props) {
|
||||||
<IconButton onClick={toggleTheme} className={classes.rightIcon} aria-label="Toggle Theme">
|
<IconButton onClick={toggleTheme} className={classes.rightIcon} aria-label="Toggle Theme">
|
||||||
<ThemeIcon />
|
<ThemeIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</React.Fragment>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue