diff --git a/frontend/src/Admin/index.tsx b/frontend/src/Admin/index.tsx index 45dfa92..02884c5 100644 --- a/frontend/src/Admin/index.tsx +++ b/frontend/src/Admin/index.tsx @@ -171,7 +171,7 @@ const AddUserPopup: React.FC = ({ onAddUser }) => { const AdminRoute = () => { useEffect(() => { - document.title = 'Taskcafé | Admin'; + document.title = 'Admin | Taskcafé'; }, []); const { loading, data } = useUsersQuery(); const { showPopup, hidePopup } = usePopup(); diff --git a/frontend/src/Projects/index.tsx b/frontend/src/Projects/index.tsx index 1b957e1..3f989b4 100644 --- a/frontend/src/Projects/index.tsx +++ b/frontend/src/Projects/index.tsx @@ -260,11 +260,7 @@ const Projects = () => { }, }); if (loading) { - return ( - <> - loading - - ); + return ; } const colors = ['#e362e3', '#7a6ff0', '#37c5ab', '#aa62e3', '#e8384f']; diff --git a/frontend/src/Teams/index.tsx b/frontend/src/Teams/index.tsx index 012fcc7..4ec2050 100644 --- a/frontend/src/Teams/index.tsx +++ b/frontend/src/Teams/index.tsx @@ -85,18 +85,30 @@ type TeamsRouteProps = { const Teams = () => { const { teamID } = useParams(); const history = useHistory(); - const { loading, data } = useGetTeamQuery({ variables: { teamID } }); + const { loading, data } = useGetTeamQuery({ + variables: { teamID }, + onCompleted: resp => { + document.title = `${resp.findTeam.name} | Taskcafé`; + }, + }); const { user } = useCurrentUser(); const [currentTab, setCurrentTab] = useState(0); const match = useRouteMatch(); - useEffect(() => { - document.title = 'Teams | Taskcafé'; - }, []); if (loading) { return ( - <> - loading - + { + setCurrentTab(tab); + }} + onSaveProjectName={NOOP} + projectID={null} + name={null} + /> ); } if (data && user) {