feat: public view

This commit is contained in:
cv
2021-04-25 23:58:41 +02:00
parent 116708726b
commit 24187b29eb
10 changed files with 303 additions and 5 deletions
+1 -2
View File
@@ -5,7 +5,6 @@ import { useSocket } from '../../app/context/socketContext';
import { stringFromMillis } from '../../common/dateConfig';
import { useFetch } from '../../app/hooks/useFetch';
const withSocket = (Component) => {
const WrappedComponent = (props) => {
const {
@@ -132,7 +131,7 @@ const withSocket = (Component) => {
if (eventsData == null) return;
// filter just events with title
const pe = eventsData.filter((d) => d.type === 'event' && d.title !== '');
const pe = eventsData.filter((d) => d.type === 'event' && d.title !== '' && d.isPublic === true);
setPublicEvents(pe);
// everything goes backstage