Skip to content

Commit

Permalink
make download link consistent across all devices
Browse files Browse the repository at this point in the history
  • Loading branch information
mikevanis committed Mar 4, 2021
1 parent 4ed76f4 commit c242b3e
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {Modal, Button} from 'react-bootstrap';
import LazyLoad from 'react-lazy-load';
import {CheckCircle, Cancel} from '@material-ui/icons'
import {GridList, GridListTile} from "@material-ui/core";
import {BrowserView, MobileView} from 'react-device-detect';

class GalleryGrid extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -81,14 +80,9 @@ class GalleryGrid extends React.Component {
<Modal.Footer>
{this.state.activeContent.endsWith(".jpg") &&
<div className="footer-content">
<MobileView>
<p className="mr-auto">Press and hold photo for download options.</p>
</MobileView>
<BrowserView>
<p className="mr-auto">
<a href={this.state.activeContent} download={this.state.activeContent.substring(this.state.activeContent.lastIndexOf('/')+1)}>Download Photo</a>
</p>
</BrowserView>
<p className="mr-auto">
<a href={this.state.activeContent} download={this.state.activeContent.substring(this.state.activeContent.lastIndexOf('/')+1)}>Download Photo</a>
</p>
</div>
}
{this.state.activeContent.endsWith(".mp4") &&
Expand Down

0 comments on commit c242b3e

Please sign in to comment.