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

33 lines
931 B

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