import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { useTranslation, Trans } from 'react-i18next'; import { Icon } from 'semantic-ui-react'; import ProjectsContainer from '../../containers/ProjectsContainer'; import BoardWrapperContainer from '../../containers/BoardWrapperContainer'; import styles from './StaticWrapper.module.css'; const StaticWrapper = ({ cardId, boardId, projectId }) => { const [t] = useTranslation(); useEffect(() => { document.body.style.overflowX = 'auto'; // TODO: only for board }, []); if (projectId === undefined) { return (
); } if (cardId === null) { return (

{t('common.cardNotFound', { context: 'title', })}

); } if (boardId === null) { return (

{t('common.boardNotFound', { context: 'title', })}

); } if (projectId === null) { return (

{t('common.projectNotFound', { context: 'title', })}

); } if (boardId === undefined) { return (

{t('common.openBoard', { context: 'title', })}

); } return (
); }; StaticWrapper.propTypes = { cardId: PropTypes.string, boardId: PropTypes.string, projectId: PropTypes.string, }; StaticWrapper.defaultProps = { cardId: undefined, boardId: undefined, projectId: undefined, }; export default StaticWrapper;