From 29546c94064b580e5bcc1bb611c74d8a11c5f28f Mon Sep 17 00:00:00 2001 From: samliu Date: Sun, 25 Feb 2024 11:04:26 -0500 Subject: [PATCH] Added structure for genre filtering --- .../BookSearchBar/BookSearchBar.tsx | 50 +++++++++++++++---- mobile/Components/ShelfModal/ShelfModal.tsx | 17 ++++++- 2 files changed, 56 insertions(+), 11 deletions(-) diff --git a/mobile/Components/BookSearchBar/BookSearchBar.tsx b/mobile/Components/BookSearchBar/BookSearchBar.tsx index 7951ed67..a192ffc2 100644 --- a/mobile/Components/BookSearchBar/BookSearchBar.tsx +++ b/mobile/Components/BookSearchBar/BookSearchBar.tsx @@ -7,6 +7,35 @@ import {} from "react-native-vector-icons" import { RadioButton } from 'react-native-paper'; import { DATA } from "./Genres"; +export const genresSelected: Array = [ + "YOUNG ADULT FICTION","ANTIQUES & COLLECTIBLES", + "LITERARY COLLECTIONS","ARCHITECTURE", + "LITERARY CRITICISM","ART", + "MATHEMATICS","BIBLES", + "MEDICAL","BIOGRAPHY & AUTOBIOGRAPHY", + "MUSIC","BODY", + "MIND & SPIRIT","NATURE", + "BUSINESS & ECONOMICS","PERFORMING ARTS", + "COMICS & GRAPHIC NOVELS","PETS", + "COMPUTERS","PHILOSOPHY", + "COOKING","PHOTOGRAPHY", + "CRAFTS & HOBBIES","POETRY","DESIGN", + "POLITICAL SCIENCE","DRAMA", + "PSYCHOLOGY","EDUCATION", + "REFERENCE","FAMILY & RELATIONSHIPS", + "RELIGION","FICTION", + "SCIENCE","FOREIGN LANGUAGE STUDY", + "SELF-HELP","GAMES & ACTIVITIES", + "SOCIAL SCIENCE","GARDENING", + "SPORTS & RECREATION","HEALTH & FITNESS", + "STUDY AIDS","HISTORY", + "TECHNOLOGY & ENGINEERING","HOUSE & HOME", + "TRANSPORTATION","HUMOR", + "TRAVEL","JUVENILE FICTION", + "TRUE CRIME","JUVENILE NONFICTION", + "LANGUAGE ARTS & DISCIPLINES", + "YOUNG ADULT NONFICTION","LAW"]; + const BookSearchBar = ( {search, updateSearch} ) => { const [checked, setChecked] = React.useState('title'); const [isOverlayVisible, setOverlayVisible] = useState(false); @@ -35,20 +64,20 @@ const BookSearchBar = ( {search, updateSearch} ) => { -