diff --git a/packages/concordia-app/src/components/Placeholder/index.jsx b/packages/concordia-app/src/components/Placeholder/index.jsx
new file mode 100644
index 0000000..5c9394e
--- /dev/null
+++ b/packages/concordia-app/src/components/Placeholder/index.jsx
@@ -0,0 +1,49 @@
+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 (
+
@@ -40,11 +39,11 @@ const Board = (props) => {
);
}, [numberOfTopics, userHasSignedUp, t]);
- return (
-
- {boardContents}
-
- );
+ return (boardContents);
+};
+
+Board.propTypes = {
+ numberOfTopics: PropTypes.number.isRequired,
};
export default Board;
diff --git a/packages/concordia-app/src/views/Home/index.jsx b/packages/concordia-app/src/views/Home/index.jsx
index 42808b0..a919f97 100644
--- a/packages/concordia-app/src/views/Home/index.jsx
+++ b/packages/concordia-app/src/views/Home/index.jsx
@@ -5,11 +5,12 @@ import { Container } from 'semantic-ui-react';
import { useSelector } from 'react-redux';
import AppContext from '../../components/AppContext';
import Board from './Board';
+import './styles.css';
const Home = () => {
- const getNumberOfTopicsResults = useSelector((state) => state.contracts.Forum.getNumberOfTopics);
const { drizzle: { contracts: { Forum: { methods: { getNumberOfTopics } } } } } = useContext(AppContext.Context);
const [numberOfTopicsCallHash, setNumberOfTopicsCallHash] = useState('');
+ const getNumberOfTopicsResults = useSelector((state) => state.contracts.Forum.getNumberOfTopics);
useEffect(() => {
setNumberOfTopicsCallHash(getNumberOfTopics.cacheCall());
@@ -21,7 +22,7 @@ const Home = () => {
[getNumberOfTopicsResults, numberOfTopicsCallHash]);
return (
-
+
{numberOfTopics !== null && }
);
diff --git a/packages/concordia-app/src/views/Home/styles.css b/packages/concordia-app/src/views/Home/styles.css
new file mode 100644
index 0000000..217a32d
--- /dev/null
+++ b/packages/concordia-app/src/views/Home/styles.css
@@ -0,0 +1,3 @@
+#home-container {
+ height: 100%;
+}
\ No newline at end of file
diff --git a/packages/concordia-app/src/views/Topic/TopicView/index.jsx b/packages/concordia-app/src/views/Topic/TopicView/index.jsx
index 4e0710a..56fd2dc 100644
--- a/packages/concordia-app/src/views/Topic/TopicView/index.jsx
+++ b/packages/concordia-app/src/views/Topic/TopicView/index.jsx
@@ -12,7 +12,7 @@ const TopicView = (props) => {
};
TopicView.propTypes = {
- topicId: PropTypes.number,
+ topicId: PropTypes.number.isRequired,
};
export default TopicView;