Skip to content

Commit

Permalink
more code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
sam9116 committed Dec 1, 2024
1 parent 2fa8023 commit 684b6f4
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 63 deletions.
2 changes: 0 additions & 2 deletions src/Odyssey/Odyssey.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import React from 'react';
import { Grid, Button, Stack, Box } from "@mui/material";
// Import other components
import SharePage from "./SharePage.js";
import html2canvas from "html2canvas";
import canvas2image from "@reglendo/canvas2image";


function capitalizeFirstChar(str) {
Expand Down
2 changes: 1 addition & 1 deletion src/Odyssey/SharePage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Stack, TextField, Button } from '@mui/material';
import { Stack, TextField } from '@mui/material';
import Map from "./map";
import { useLoadScript } from "@react-google-maps/api"
import SharePageList from './SharePageList';
Expand Down
1 change: 0 additions & 1 deletion src/Odyssey/SharePageList.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const SharePageList = ({ concerts }) => {
<List >
{concerts.map((concert, index) => (
<ListItem

key={index}
disablePadding>
<ListItemButton>
Expand Down
2 changes: 1 addition & 1 deletion src/TaleSetup/GetSpotifyPlaylistArtistsWithShows.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function GetSpotifyPlaylistArtistsWithShows({ followedArtists, setFollowedArtist
"& label": {
color: "white",
},
width:{xs:'100%'}
width: { xs: '100%' }
}}
label="Spotify Playlist URL:"
value={spotifyPlayList} onChange={(e) => setSpotifyPlaylist(e.target.value)}
Expand Down
112 changes: 56 additions & 56 deletions src/TaleSetup/TaleSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import GetSpotifyPlaylistArtistsWithShows from "./GetSpotifyPlaylistArtistsWithS
import YourSpotifyArtistsWithShows from "./YourSpotifyArtistsWithShows.js";
import PickDate from "./PickDate.js";
import ConcertList from "./ConcertList.js";
import {useRef } from "react";
import { Grid, Box, Stack } from "@mui/material";
import { useRef } from "react";
import { Box, Stack } from "@mui/material";



Expand Down Expand Up @@ -44,59 +44,59 @@ const TaleSetup = ({ setStartDate,
}

return (
<Stack sx={{container:true, flexDirection:'column'}} spacing={4}>
<Box>
<img src={window.location.origin + "/Taver.png"} alt="Taver" />
</Box>
<PickDate
updateStartDateInParent={setStartDate}
updateEndDateInParent={setEndDate}
artistName={artistName}
newArtistList={setArtistList}
openDialog={setOpenDialog}
/>
<BaseInput
setConcerts={setConcerts}
setUserLocation={setUserLocation}
setMapStyle={setMapStyle}
setAllConcerts={setAllConcerts}
startDate={startDate}
endDate={endDate}
allConcerts={allConcerts}
userLocation={userLocation}
updateArtistNameInParent={(value) => setArtistName(value)}
newArtistList={setArtistList}
artistListFromParent={artistList}
followedArtists={followedArtists}
setFollowedArtists={setFollowedArtists}
artistWishlist={artistWishlist}
setArtistWishlist={setArtistWishlist}
openDialogFromParent={openDialog}
closeDialog={() => {
setOpenDialog(false);
}}
ref={childRef}
/>
<GetSpotifyPlaylistArtistsWithShows
followedArtists={followedArtists}
setFollowedArtists={setFollowedArtists}
startDate={startDate}
endDate={endDate}
setIsRequestTriggered={setIsRequestTriggered}
/>
<YourSpotifyArtistsWithShows
artists={followedArtists}
onChildClick={handleChildClick}
isRequestTriggered={isRequestTriggered}
/>
<ConcertList
setConcerts={setConcerts}
setAllConcerts={setAllConcerts}
artistWishlist={artistWishlist}
setArtistWishlist={setArtistWishlist}
concerts={concerts}
triggerReEvaluation={triggerReEvaluation}
/>
</Stack>);
<Stack sx={{ container: true, flexDirection: 'column' }} spacing={4}>
<Box>
<img src={window.location.origin + "/Taver.png"} alt="Taver" />
</Box>
<PickDate
updateStartDateInParent={setStartDate}
updateEndDateInParent={setEndDate}
artistName={artistName}
newArtistList={setArtistList}
openDialog={setOpenDialog}
/>
<BaseInput
setConcerts={setConcerts}
setUserLocation={setUserLocation}
setMapStyle={setMapStyle}
setAllConcerts={setAllConcerts}
startDate={startDate}
endDate={endDate}
allConcerts={allConcerts}
userLocation={userLocation}
updateArtistNameInParent={(value) => setArtistName(value)}
newArtistList={setArtistList}
artistListFromParent={artistList}
followedArtists={followedArtists}
setFollowedArtists={setFollowedArtists}
artistWishlist={artistWishlist}
setArtistWishlist={setArtistWishlist}
openDialogFromParent={openDialog}
closeDialog={() => {
setOpenDialog(false);
}}
ref={childRef}
/>
<GetSpotifyPlaylistArtistsWithShows
followedArtists={followedArtists}
setFollowedArtists={setFollowedArtists}
startDate={startDate}
endDate={endDate}
setIsRequestTriggered={setIsRequestTriggered}
/>
<YourSpotifyArtistsWithShows
artists={followedArtists}
onChildClick={handleChildClick}
isRequestTriggered={isRequestTriggered}
/>
<ConcertList
setConcerts={setConcerts}
setAllConcerts={setAllConcerts}
artistWishlist={artistWishlist}
setArtistWishlist={setArtistWishlist}
concerts={concerts}
triggerReEvaluation={triggerReEvaluation}
/>
</Stack>);
};
export default TaleSetup;
4 changes: 2 additions & 2 deletions src/TaleSetup/YourSpotifyArtistsWithShows.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react';
import { Grid, Chip, Box, CircularProgress,Typography } from '@mui/material';
import { Grid, Chip, Box, CircularProgress, Typography } from '@mui/material';
import SwipeableTextMobileStepper from './ArtistsCarrousel'

function YourSpotifyArtistsWithShows({ artists, onChildClick, isRequestTriggered }) {
Expand Down Expand Up @@ -51,7 +51,7 @@ function YourSpotifyArtistsWithShows({ artists, onChildClick, isRequestTriggered
{commaSeparatedfollowedArtists}
</Grid>
</Box>)}
{isLoading && <CircularProgress sx={{ mt: 5 }}/>}
{isLoading && <CircularProgress sx={{ mt: 5 }} />}
</Grid>
);
}
Expand Down

0 comments on commit 684b6f4

Please sign in to comment.