33 * See the LICENSE file in the repository root folder for details.
44 */
55
6- import { Typography , Alert , Link } from '@mui/material' ;
7- import { routes } from '../../utils/routes' ;
6+ import { Typography } from '@mui/material' ;
87import OverdueWorkPackageAlerts from './OverdueWorkPackageAlerts' ;
98import UsefulLinks from './UsefulLinks' ;
109import WorkPackagesByTimelineStatus from './WorkPackagesByTimelineStatus' ;
1110import UpcomingDeadlines from './UpcomingDeadlines' ;
1211import { useCurrentUser , useSingleUserSettings } from '../../hooks/users.hooks' ;
1312import LoadingIndicator from '../../components/LoadingIndicator' ;
1413import ErrorPage from '../ErrorPage' ;
15- import { useHistory } from 'react-router-dom' ;
1614import PageLayout from '../../components/PageLayout' ;
1715
1816const Home = ( ) => {
1917 const user = useCurrentUser ( ) ;
20- const history = useHistory ( ) ;
2118 const { isLoading, isError, error, data : userSettingsData } = useSingleUserSettings ( user . userId ) ;
2219
2320 if ( isLoading || ! userSettingsData ) return < LoadingIndicator /> ;
@@ -28,15 +25,6 @@ const Home = () => {
2825 < Typography variant = "h3" marginLeft = "auto" sx = { { marginTop : 2 , textAlign : 'center' , pt : 3 , padding : 0 } } >
2926 Welcome, { user . firstName } !
3027 </ Typography >
31- { ! userSettingsData ?. slackId && (
32- < Alert variant = "filled" severity = "warning" onClose = { ( ) => history . push ( routes . SETTINGS ) } >
33- You don't have a slack id set! Without it, you won't be able to get important updates from us. You can set it{ ' ' }
34- < Link href = { routes . SETTINGS } sx = { { color : 'blue' } } >
35- here
36- </ Link >
37- .
38- </ Alert >
39- ) }
4028 < OverdueWorkPackageAlerts />
4129 < UsefulLinks />
4230 < UpcomingDeadlines />
0 commit comments