diff --git a/src/App.js b/src/App.js index ba81f18..7b7dfdd 100644 --- a/src/App.js +++ b/src/App.js @@ -1,15 +1,14 @@ /*import logo from './logo.svg';*/ import "./App.css"; -import BaseInput from "./BaseInput.js"; + +import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; import { useState, useRef, useEffect } from "react"; import { Grid, Box, Button } from "@mui/material"; -import PickDate from "./PickDate.js"; -import ConcertList from "./ConcertList.js"; +import TaleSetup from "./Setup/TaleSetup.js"; import SharePage from "./SharePage.js"; import html2canvas from "html2canvas"; import canvas2image from "@reglendo/canvas2image"; -import GetSpotifyPlaylistArtistsWithShows from "./GetSpotifyPlaylistArtistsWithShows.js"; -import YourSpotifyArtistsWithShows from "./YourSpotifyArtistsWithShows.js"; + function App() { let cachedStartDate = localStorage.getItem("startDate"); @@ -102,62 +101,30 @@ function App() { columnSpacing={{ xs: 1, sm: 2, md: 3, lg: 10, xl: 3 }} alignItems="flex-start" > - - - Taver - - -

- setArtistName(value)} - newArtistList={setArtistList} - artistListFromParent={artistList} - followedArtists={followedArtists} - setFollowedArtists={setFollowedArtists} - artistWishlist={artistWishlist} - setArtistWishlist={setArtistWishlist} - openDialogFromParent={openDialog} - closeDialog={() => { - setOpenDialog(false); - }} - ref={childRef} - /> - - - - +

{ const text = { color: 'red' } + + return ( {artists.map((artist, index) => ( @@ -11,11 +13,10 @@ const ArtistChoiceList = ({ artists, onArtistClick }) => { 1 ? artist.images[1].url : ''} /> { + + + const childRef = useRef(); + const handleChildClick = (artistName) => { + childRef.current.handleRequestFromParent(artistName); + }; + const triggerReEvaluation = (updatedArtistWishlist) => { + console.log("trigger re-evaluation"); + childRef.current.handleReEvaluation(updatedArtistWishlist); + } + + return ( + + Taver + + +

+ setArtistName(value)} + newArtistList={setArtistList} + artistListFromParent={artistList} + followedArtists={followedArtists} + setFollowedArtists={setFollowedArtists} + artistWishlist={artistWishlist} + setArtistWishlist={setArtistWishlist} + openDialogFromParent={openDialog} + closeDialog={() => { + setOpenDialog(false); + }} + ref={childRef} + /> + + + + ); +}; +export default TaleSetup; \ No newline at end of file diff --git a/src/YourSpotifyArtistsWithShows.js b/src/Setup/YourSpotifyArtistsWithShows.js similarity index 100% rename from src/YourSpotifyArtistsWithShows.js rename to src/Setup/YourSpotifyArtistsWithShows.js