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 (