Skip to content

Commit

Permalink
cleaned up share UI a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
sam9116 committed Nov 11, 2024
1 parent 1205b35 commit 7dec4c7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
50 changes: 29 additions & 21 deletions src/Odyssey/Odyssey.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Grid, Button } from "@mui/material";
import { Grid, Button, Stack, Container } from "@mui/material";
// Import other components
import SharePage from "./SharePage.js";
import html2canvas from "html2canvas";
Expand Down Expand Up @@ -87,26 +87,34 @@ const Odyssey = ({
setPosterName={setPosterName}
/>
</div>
<Grid spacing={2} direction={"row"}>
<Grid item>
<Button
id="sharelinkbutton"
color="primary"
disabled={concerts.length === 0}
onClick={handleShareAsLink}
variant="contained">Share As Link To Clipboard</Button>
</Grid>
<Grid item>
<Button
id="sharebutton"
color="primary"
onClick={handleDownloadImage}
variant="contained"
>
Share As Image
</Button>
</Grid>
</Grid>

<Stack
container
sx={{
justifyContent: { xs: 'flex-start', sm: 'center' },
flexDirection: { xs: 'column', sm: 'row' }, // Change direction based on screen size
gap: 2
}}
>
<Button
id="sharelinkbutton"
color="primary"
disabled={concerts.length === 0}
onClick={handleShareAsLink}
variant="contained">
Share As Link
</Button>

<Button
id="sharebutton"
color="primary"
disabled={concerts.length === 0}
onClick={handleDownloadImage}
variant="contained"
>
Share As Image
</Button>
</Stack>
</Grid>
);
};
Expand Down
3 changes: 2 additions & 1 deletion src/Odyssey/SharePageList.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ function formattedDate(incomingDate) {

const SharePageList = ({ concerts }) => {
return (
<List dense>
<List >
{concerts.map((concert, index) => (
<ListItem

key={index}
disablePadding>
<ListItemButton>
Expand Down
2 changes: 1 addition & 1 deletion src/Odyssey/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const concertToMarker = (concert) => {
id: concert.title + concert.date,
name: concert.title,
artistImageUrl: concert.image.url,
address: concert.location.address,
address: concert.location.name,
position: {
lat: concert.location.gpsCoordinate.coords.latitude,
lng: concert.location.gpsCoordinate.coords.longitude,
Expand Down

0 comments on commit 7dec4c7

Please sign in to comment.