The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/components/NotFoundState.tsx

35 lines
958 B

import { Box, States, StatesAction, StatesActions, StatesIcon, StatesSubtitle, StatesTitle } from '@rocket.chat/fuselage';
import { useRouter } from '@rocket.chat/ui-contexts';
import type { ReactElement } from 'react';
import { useTranslation } from 'react-i18next';
type NotFoundProps = {
title: string;
subtitle: string;
};
const NotFoundState = ({ title, subtitle }: NotFoundProps): ReactElement => {
const { t } = useTranslation();
const router = useRouter();
const handleGoHomeClick = () => {
router.navigate('/home');
};
return (
<Box display='flex' justifyContent='center' height='full'>
<States>
<StatesIcon name='magnifier' />
<StatesTitle>{title}</StatesTitle>
<StatesSubtitle>{subtitle}</StatesSubtitle>
<Box mbs={16}>
<StatesActions>
<StatesAction onClick={handleGoHomeClick}>{t('Homepage')}</StatesAction>
</StatesActions>
</Box>
</States>
</Box>
);
};
export default NotFoundState;