diff --git a/client/public/style.css b/client/public/style.css index 8e6d14b..715ba8a 100644 --- a/client/public/style.css +++ b/client/public/style.css @@ -32,12 +32,6 @@ left: 0px; } - - - - - - .calendar { border-radius: 8px; font-size: 2vh; @@ -61,48 +55,9 @@ .categories { width: 90%; - overflow-x: scroll; -} - -.eventContainer { - display: flex; - flex-direction: column; - width: 100vw; - margin: 0; - font-family: 'Questrial', sans-serif; - font-size: 2vh; + /* overflow-x:; */ } -.eventRows { - display: flex; - justify-content: space-evenly; - flex-direction: row; - margin-top: 2vw; - margin-bottom: 5vw; - margin-left: 2.5vw; - margin-right: 2.5vw; -} - -.homePageEventCard { - width: 35vh; - height: 50vh; - text-align: center; - margin-left: 1.5vw; - margin-right: 1.5vw; -} - -.homePageEventPhoto { - width: 32vh; - height: 48vh; - text-align: center; - border-radius: 5%; - object-fit: cover; -} - - -.homePageRelative { - position: relative; -} .pepe { height: 10vw; diff --git a/client/src/components/App.jsx b/client/src/components/App.jsx index 45cc549..a74516f 100644 --- a/client/src/components/App.jsx +++ b/client/src/components/App.jsx @@ -1,19 +1,7 @@ import { Header } from './header'; import HomePage from './homepage/homepage.jsx'; import React, { useState, useEffect } from "react"; -import { - Box, Heading, Spacer, Menu, Stack, FormControl, Input, - MenuButton, - MenuList, - MenuItem, - MenuItemOption, - MenuGroup, - MenuOptionGroup, - MenuDivider, - Button, - Flex, - extendTheme -} from '@chakra-ui/react'; +import { Box, Input, Button, Flex} from '@chakra-ui/react'; import { ChevronDownIcon } from '@chakra-ui/icons'; import { Link } from "react-router-dom"; import axios from 'axios'; @@ -38,7 +26,7 @@ const App = () => { return (
-
+
{ return ( - + diff --git a/client/src/components/homepage/filterList.jsx b/client/src/components/homepage/filterList.jsx index 7c7873c..f524cab 100644 --- a/client/src/components/homepage/filterList.jsx +++ b/client/src/components/homepage/filterList.jsx @@ -16,7 +16,7 @@ const FilterList = ({ category, events, handleReset }) => { return ( - + Filter by: {category}
*/} { fontSize="5vh" marginLeft="5vw" marginTop="2vw" - marginBottom="2vw" + marginBottom='1vw' > Popular near you... @@ -170,9 +204,8 @@ const HomePage = ({ searchEvent }) => { })} ) : null} - ); }; -export default HomePage; +export default HomePage; \ No newline at end of file diff --git a/client/src/components/preferences/Preferences.jsx b/client/src/components/preferences/Preferences.jsx index f0c6026..13b46aa 100644 --- a/client/src/components/preferences/Preferences.jsx +++ b/client/src/components/preferences/Preferences.jsx @@ -209,7 +209,7 @@ const Preferences = ({userId}) => { return (
- + {currentStepData.label}

{currentStepData.question}

@@ -233,17 +233,17 @@ const Preferences = ({userId}) => {
{stepIndex > 0 && - + Previous } {stepIndex < steps.length - 1 && - + Next } {stepIndex === steps.length - 1 && - + Finish } diff --git a/server/controllers/events.js b/server/controllers/events.js index 8299bb9..5f19fde 100644 --- a/server/controllers/events.js +++ b/server/controllers/events.js @@ -53,9 +53,11 @@ const getSpecificEvent = async (req, res) => { const getEventsByTime = async (req, res) => { let limit = req.query.limit || 10; let page = req.query.page || 0; - let minutes = req.query.minutes; + let date = req.query.date; + let validFrom = req.query.validFrom; + let validTo = req.query.validTo; try { - const { rows } = await models.getEventsByTime(minutes,limit, page); + const { rows } = await models.getEventsByTime(date, validFrom, validTo, limit, page); res.send(rows); } catch (e) { res.status(500).send(e); diff --git a/server/models/events.js b/server/models/events.js index eac272d..da4db90 100644 --- a/server/models/events.js +++ b/server/models/events.js @@ -20,14 +20,14 @@ const getSpecificEvent = (id) => { return db.pool.query(query); } -const getEventsByTime = (minutes,limit = 10, page = 0) => { - let offset = limit * page; +const getEventsByTime = (date, validFrom, validTo, limit = 10, page = 0) => { const query = ` select * from events - where event_length_minutes < ${minutes} - limit ${limit} - offset ${offset}; + where date='${date}' + and start_time + between '${validFrom}' + and '${validTo}'; ` return db.pool.query(query); }