From c2c42bfbd4176fc38d0ca761add74fd25e68497b Mon Sep 17 00:00:00 2001 From: Apostolof Date: Sun, 15 Nov 2020 02:11:13 +0200 Subject: [PATCH] Remove Placeholder component --- .../src/components/Placeholder/index.jsx | 49 ------------------- 1 file changed, 49 deletions(-) delete mode 100644 packages/concordia-app/src/components/Placeholder/index.jsx diff --git a/packages/concordia-app/src/components/Placeholder/index.jsx b/packages/concordia-app/src/components/Placeholder/index.jsx deleted file mode 100644 index 5c9394e..0000000 --- a/packages/concordia-app/src/components/Placeholder/index.jsx +++ /dev/null @@ -1,49 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { List } from 'semantic-ui-react'; -import { PLACEHOLDER_TYPE_POST, PLACEHOLDER_TYPE_TOPIC } from '../../constants/PlaceholderTypes'; - -const Placeholder = (props) => { - const { placeholderType, extra } = props; - - switch (placeholderType) { - case PLACEHOLDER_TYPE_TOPIC: - return ( - <> - - - topicSubject - - - username - Number of Replies - timestamp - - - ); - case PLACEHOLDER_TYPE_POST: - return ( -
LOADING POST
- ); - default: - return
; - } -}; - -const TopicPlaceholderExtra = PropTypes.PropTypes.shape({ - topicId: PropTypes.number.isRequired, -}); - -const PostPlaceholderExtra = PropTypes.PropTypes.shape({ - postIndex: PropTypes.number.isRequired, -}); - -Placeholder.propTypes = { - placeholderType: PropTypes.string.isRequired, - extra: PropTypes.oneOfType([ - TopicPlaceholderExtra.isRequired, - PostPlaceholderExtra.isRequired, - ]), -}; - -export default Placeholder;