From 0264c4a4a7d4e869f09328b3fd0f46b875ea6b2f Mon Sep 17 00:00:00 2001 From: Paul Diaz Date: Tue, 25 Oct 2022 12:58:01 -0500 Subject: [PATCH] Sort by genre, not done yet. --- .../src/components/SelectGenre.jsx | 12 +++- lipscombplus-ui/src/pages/Chapels.jsx | 6 +- lipscombplus-ui/src/pages/Concerts.jsx | 16 ++++-- lipscombplus-ui/src/pages/Events.jsx | 56 ++++++++++--------- lipscombplus-ui/src/pages/Netflix.jsx | 9 --- lipscombplus-ui/src/pages/Sports.jsx | 55 +++++++++--------- lipscombplus-ui/src/store/index.js | 17 +++++- 7 files changed, 99 insertions(+), 72 deletions(-) delete mode 100644 lipscombplus-ui/src/pages/Netflix.jsx diff --git a/lipscombplus-ui/src/components/SelectGenre.jsx b/lipscombplus-ui/src/components/SelectGenre.jsx index 19b7130..90f0cd2 100644 --- a/lipscombplus-ui/src/components/SelectGenre.jsx +++ b/lipscombplus-ui/src/components/SelectGenre.jsx @@ -1,9 +1,15 @@ import React from 'react' import styled from "styled-components" +import { useDispatch } from 'react-redux'; +import { fetchDataByGenre } from '../store'; + +export default function SelectGenre({genres, type}) { + const dispatch = useDispatch(); -export default function SelectGenre(genres, type) { return ( - { + dispatch(fetchDataByGenre({genre: e.target.value})) + }}> {genres.map((genre) => { return (