mhpark / Edu_Tech star
박민혁 박민혁 06-10
240610 박민혁
@6a3fb29aec7cbc1eb6dc1a57a07824ebca75d2c9
 
public/contents/afternoon.mp3 (Binary) (added)
+++ public/contents/afternoon.mp3
Binary file is not shown
 
public/contents/afternoon.webp (Binary) (added)
+++ public/contents/afternoon.webp
Binary file is not shown
 
public/contents/apple.mp3 (Binary) (added)
+++ public/contents/apple.mp3
Binary file is not shown
 
public/contents/apple.png (Binary) (added)
+++ public/contents/apple.png
Binary file is not shown
 
public/contents/bad.mp3 (Binary) (added)
+++ public/contents/bad.mp3
Binary file is not shown
 
public/contents/bad.png (Binary) (added)
+++ public/contents/bad.png
Binary file is not shown
 
public/contents/cow.png (Binary) (added)
+++ public/contents/cow.png
Binary file is not shown
 
public/contents/cut1.png (Binary) (added)
+++ public/contents/cut1.png
Binary file is not shown
 
public/contents/cut2.png (Binary) (added)
+++ public/contents/cut2.png
Binary file is not shown
 
public/contents/cut3.png (Binary) (added)
+++ public/contents/cut3.png
Binary file is not shown
 
public/contents/cut4.png (Binary) (added)
+++ public/contents/cut4.png
Binary file is not shown
 
public/contents/cut5.png (Binary) (added)
+++ public/contents/cut5.png
Binary file is not shown
 
public/contents/cut6.png (Binary) (added)
+++ public/contents/cut6.png
Binary file is not shown
 
public/contents/cut7.png (Binary) (added)
+++ public/contents/cut7.png
Binary file is not shown
 
public/contents/cut8.png (Binary) (added)
+++ public/contents/cut8.png
Binary file is not shown
 
public/contents/daddy.png (Binary) (added)
+++ public/contents/daddy.png
Binary file is not shown
 
public/contents/evening.mp3 (Binary) (added)
+++ public/contents/evening.mp3
Binary file is not shown
 
public/contents/evening.webp (Binary) (added)
+++ public/contents/evening.webp
Binary file is not shown
 
public/contents/gingerbreadman.mp3 (Binary) (added)
+++ public/contents/gingerbreadman.mp3
Binary file is not shown
 
public/contents/gingerbreadman.png (Binary) (added)
+++ public/contents/gingerbreadman.png
Binary file is not shown
 
public/contents/good.mp3 (Binary) (added)
+++ public/contents/good.mp3
Binary file is not shown
 
public/contents/good.png (Binary) (added)
+++ public/contents/good.png
Binary file is not shown
 
public/contents/goodmorning.mp3 (Binary) (added)
+++ public/contents/goodmorning.mp3
Binary file is not shown
 
public/contents/goodmorningmom.mp3 (Binary) (added)
+++ public/contents/goodmorningmom.mp3
Binary file is not shown
 
public/contents/grape.mp3 (Binary) (added)
+++ public/contents/grape.mp3
Binary file is not shown
 
public/contents/grape.png (Binary) (added)
+++ public/contents/grape.png
Binary file is not shown
 
public/contents/iambad.mp3 (Binary) (added)
+++ public/contents/iambad.mp3
Binary file is not shown
 
public/contents/iamsogood.mp3 (Binary) (added)
+++ public/contents/iamsogood.mp3
Binary file is not shown
 
public/contents/mommy.png (Binary) (added)
+++ public/contents/mommy.png
Binary file is not shown
 
public/contents/morning.mp3 (Binary) (added)
+++ public/contents/morning.mp3
Binary file is not shown
 
public/contents/morning.webp (Binary) (added)
+++ public/contents/morning.webp
Binary file is not shown
 
public/contents/old.png (Binary) (added)
+++ public/contents/old.png
Binary file is not shown
 
public/contents/rain.png (Binary) (added)
+++ public/contents/rain.png
Binary file is not shown
 
public/contents/rain1.mp3 (Binary) (added)
+++ public/contents/rain1.mp3
Binary file is not shown
 
public/contents/rain2.mp3 (Binary) (added)
+++ public/contents/rain2.mp3
Binary file is not shown
 
public/contents/rain3.mp3 (Binary) (added)
+++ public/contents/rain3.mp3
Binary file is not shown
 
public/contents/rain4.mp3 (Binary) (added)
+++ public/contents/rain4.mp3
Binary file is not shown
 
public/contents/song1.mp3 (Binary) (added)
+++ public/contents/song1.mp3
Binary file is not shown
 
public/contents/song2.mp3 (Binary) (added)
+++ public/contents/song2.mp3
Binary file is not shown
 
public/contents/song3.mp3 (Binary) (added)
+++ public/contents/song3.mp3
Binary file is not shown
 
public/contents/song4.mp3 (Binary) (added)
+++ public/contents/song4.mp3
Binary file is not shown
 
public/contents/thecow.mp3 (Binary) (added)
+++ public/contents/thecow.mp3
Binary file is not shown
 
public/contents/thegingerbreadman.mp3 (Binary) (added)
+++ public/contents/thegingerbreadman.mp3
Binary file is not shown
src/components/contents/wordBundle/WordBundleBasicLearning.jsx
--- src/components/contents/wordBundle/WordBundleBasicLearning.jsx
+++ src/components/contents/wordBundle/WordBundleBasicLearning.jsx
@@ -1,7 +1,19 @@
-import React, { useEffect } from "react";
+import React, { useState } from "react";
 import "./WordBundleBasicLearning.css";
 
 const WordBundleBasicLearning = ({ contents }) => {
+  const [isPlaying, setIsPlaying] = useState(false);
+
+  const toggleAudio = () => {
+    const audio = document.getElementById("song-audio");
+    if (isPlaying) {
+      audio.pause();
+    } else {
+      audio.play();
+    }
+    setIsPlaying(!isPlaying);
+  };
+
   if (!contents) {
     return <div>Loading...</div>;
   }
@@ -11,12 +23,16 @@
         src={contents.image}
         alt="이미지"
         className="wordBundle-basic-learning-img"
+        onClick={toggleAudio}
       />
 
       <div className="wordBundle-basic-learning-word">
         <h1>{contents.word}</h1>
         <h3>{contents.wordMeaning}</h3>
       </div>
+      <audio id="song-audio" controls style={{ display: "none" }}>
+            <source src={contents.file} type="audio/mpeg" />
+          </audio>
     </>
   );
 };
src/components/contents/wordBundle/WordBundleDeepLearning.jsx
--- src/components/contents/wordBundle/WordBundleDeepLearning.jsx
+++ src/components/contents/wordBundle/WordBundleDeepLearning.jsx
@@ -1,7 +1,20 @@
-import React from "react";
+import React, { useState }  from "react";
 import "./WordBundleDeepLearning.css";
 
 const WordBundleDeepLearning = ({ contents }) => {
+  const [isPlaying, setIsPlaying] = useState(false);
+
+  const toggleAudio = () => {
+    const audio = document.getElementById("song-audio");
+    if (isPlaying) {
+      audio.pause();
+    } else {
+      audio.play();
+    }
+    setIsPlaying(!isPlaying);
+  };
+
+
   if (!contents) {
     return <div>Loading...</div>;
   }
@@ -11,12 +24,17 @@
         src={contents.image}
         alt="이미지"
         className="wordBundle-basic-learning-img"
+        onClick={toggleAudio}
       />
 
       <div className="wordBundle-basic-learning-word">
         <h1>{contents.sentence}</h1>
         <h3>{contents.sentence_meaning}</h3>
       </div>
+      <audio id="song-audio" controls style={{ display: "none" }}>
+            <source src={contents.sentence_file} type="audio/mpeg" />
+          </audio>
+
     </>
   );
 };
src/components/lessons/lesson1.jsx
--- src/components/lessons/lesson1.jsx
+++ src/components/lessons/lesson1.jsx
@@ -8,6 +8,7 @@
   const [planetStep, setPlanetStep] = useState(0);
   const [cookies1, setCookie1] = useCookies(["username"]);
   const [recom, setRecom] = useState([]);
+  const [ment, setMent] = useState([""]);
   const navigate = useNavigate();
   useEffect(() => {
     console.log("mainStep" + mainStep);
@@ -292,6 +293,11 @@
           </li>
         </ul>
       </div>
+      <div className="lession">
+        <h2 className="lesson-h2">
+          <mark>{ment}</mark>
+        </h2>
+      </div>
     </div>
   );
 };
src/pages/main/mainp.jsx
--- src/pages/main/mainp.jsx
+++ src/pages/main/mainp.jsx
@@ -73,7 +73,7 @@
 
   // 사용자 입력을 저장할 state 초기화
   const [comment, setComment] = useState(
-    "어서와~ 꿈 속 우주공간은 처음이지? 여행하고 싶은 행성을 골라봐~"
+    "AI 학습 도우미가 너의 학습 이력을 분석해 추천 컨텐츠를 알아냈어! \n 추천별★를 확인해봐!"
   );
   useEffect(() => {
     const fetchData = async () => {
@@ -82,7 +82,9 @@
           withCredentials: true,
         });
         console.log(response);
-        setComment(response.data.data.comment);
+        if(response.data.data.comment){
+          setComment(response.data.data.comment);
+        }
       } catch (error) {
         console.error("Error fetching data:", error);
       }
src/pages/signup/SignUpPage.jsx
--- src/pages/signup/SignUpPage.jsx
+++ src/pages/signup/SignUpPage.jsx
@@ -70,12 +70,7 @@
           onChange={(e) => setGrade(e.target.value)}
           className="signup-select"
         >
-          <option value="1">1학년</option>
-          <option value="2">2학년</option>
-          <option value="3">3학년</option>
           <option value="4">4학년</option>
-          <option value="5">5학년</option>
-          <option value="6">6학년</option>
         </select>
         <div className="signup-label">성별</div>
         <input
Add a comment
List