feat: Ghost error page for improved error display

This commit is contained in:
Maksim Eltyshev
2025-11-06 23:11:06 +01:00
parent 33a7a6ccb1
commit 22baf5ab12
42 changed files with 553 additions and 55 deletions
+4 -30
View File
@@ -13,6 +13,7 @@ import { useTransitioning } from '../../../lib/hooks';
import selectors from '../../../selectors';
import { BoardViews } from '../../../constants/Enums';
import Home from '../Home';
import GhostError from '../GhostError';
import Board from '../../boards/Board';
import styles from './Static.module.scss';
@@ -42,40 +43,13 @@ const Static = React.memo(() => {
contentNode = <Home />;
} else if (cardId === null) {
wrapperClassNames = [isFavoritesActive && styles.wrapperWithFavorites, styles.wrapperFlex];
contentNode = (
<div className={styles.message}>
<h1>
{t('common.cardNotFound', {
context: 'title',
})}
</h1>
</div>
);
contentNode = <GhostError message="common.cardNotFound" />;
} else if (board === null) {
wrapperClassNames = [isFavoritesActive && styles.wrapperWithFavorites, styles.wrapperFlex];
contentNode = (
<div className={styles.message}>
<h1>
{t('common.boardNotFound', {
context: 'title',
})}
</h1>
</div>
);
contentNode = <GhostError message="common.boardNotFound" />;
} else if (projectId === null) {
wrapperClassNames = [isFavoritesActive && styles.wrapperWithFavorites, styles.wrapperFlex];
contentNode = (
<div className={styles.message}>
<h1>
{t('common.projectNotFound', {
context: 'title',
})}
</h1>
</div>
);
contentNode = <GhostError message="common.projectNotFound" />;
} else if (board === undefined) {
wrapperClassNames = [
isFavoritesActive ? styles.wrapperProjectWithFavorites : styles.wrapperProject,