From ae53e0ba14b7e50036a6776ada6dc53132e59b64 Mon Sep 17 00:00:00 2001
From: tommy <tommyew7@gmail.com>
Date: Tue, 22 Sep 2020 19:39:07 +0200
Subject: [PATCH] See last commit message

---
 frontend/src/Components/ArtPage.tsx |  2 ++
 frontend/src/Components/Music.tsx   | 14 ++++++++++++++
 frontend/src/SVGs.tsx               |  5 ++---
 frontend/src/react-app-env.d.ts     |  4 ++++
 4 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/frontend/src/Components/ArtPage.tsx b/frontend/src/Components/ArtPage.tsx
index 62bb94b..2cbb7f6 100644
--- a/frontend/src/Components/ArtPage.tsx
+++ b/frontend/src/Components/ArtPage.tsx
@@ -4,6 +4,7 @@ import FavoriteButton from './FavoriteButton';
 import DropDown from './DropDown';
 import NavButton from './NavButton';
 import '../Style/ArtPage.css';
+import Music from "./Music";
 
 
 type props = {
@@ -23,6 +24,7 @@ class ArtPage extends React.Component<props> {
         <FavoriteButton/>
         <DropDown/>
         <ExhibitionPiece artId={this.props.pageId}/>
+          <Music/>
         <div className={'navbutton left'}>
           <NavButton changePage={this.props.changePage} direction={"left"}/>
         </div>
diff --git a/frontend/src/Components/Music.tsx b/frontend/src/Components/Music.tsx
index e69de29..9be0109 100644
--- a/frontend/src/Components/Music.tsx
+++ b/frontend/src/Components/Music.tsx
@@ -0,0 +1,14 @@
+import React from "react";
+import sound from "../Media/bensound-energy.mp3"
+const Music = () => {
+    return (
+        <div>
+            {/** Option for autoplay in Chrome
+            <iframe src={require('../Media/250-milliseconds-of-silence.mp3')} allow="autoplay" id="audio"/>
+             **/}
+            <audio src={require('../Media/bensound-energy.mp3')} controls autoPlay/>
+        </div>
+    );
+}
+
+export default Music;
diff --git a/frontend/src/SVGs.tsx b/frontend/src/SVGs.tsx
index 696d089..34324a5 100644
--- a/frontend/src/SVGs.tsx
+++ b/frontend/src/SVGs.tsx
@@ -1,9 +1,8 @@
 import React from "react";
+import SVG1 from "./SVG/svg1.svg";
 
 export default [ // Collection of Artworks that will be displayed
-  <svg viewBox={"0 0 200 80"}>
-    <rect width={"200"} height={80} fill={"blue"} />
-  </svg>,
+  SVG1,
   <svg viewBox={"0 0 200 80"}>
     <rect width={"200"} height={80} fill={"red"} />
   </svg>,
diff --git a/frontend/src/react-app-env.d.ts b/frontend/src/react-app-env.d.ts
index 6431bc5..fe3e4de 100644
--- a/frontend/src/react-app-env.d.ts
+++ b/frontend/src/react-app-env.d.ts
@@ -1 +1,5 @@
 /// <reference types="react-scripts" />
+declare module '*.mp3' {
+    const src: string;
+    export default src;
+}
\ No newline at end of file
-- 
GitLab