The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
import { AppErrorDisplay } from '@/error-handler/components/internal/AppErrorDisplay';
import { type AppErrorDisplayProps } from '@/error-handler/types/AppErrorDisplayProps';
import { styled } from '@linaria/react';
import { t } from '@lingui/core/macro';
import { themeCssVariables } from 'twenty-ui/theme';
type AppFullScreenErrorFallbackProps = AppErrorDisplayProps;
const StyledContainer = styled.div`
background: ${themeCssVariables.background.primary};
box-sizing: border-box;
display: flex;
height: calc(100dvh / var(--t-zoom, 1));
width: calc(100vw / var(--t-zoom, 1));
`;
export const AppFullScreenErrorFallback = ({
error,
resetErrorBoundary,
title = t`Sorry, something went wrong`,
}: AppFullScreenErrorFallbackProps) => {
return (
<StyledContainer>
<AppErrorDisplay
error={error}
resetErrorBoundary={resetErrorBoundary}
title={title}
/>
</StyledContainer>
);
};