-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from AlongTheBlue/alongCourses
Along courses
- Loading branch information
Showing
9 changed files
with
157 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import "../styles/Page.css"; | ||
import CourseItemList from "../components/CourseItemList"; | ||
import Footer from "../components/Footer"; | ||
import PageHeader from "../components/PageHeader"; | ||
import { useEffect, useState } from "react"; | ||
import { getMyAlongBlues } from "../utils/data"; | ||
|
||
const MyAlongBlues = () => { | ||
const [loading, setLoading] = useState(false); | ||
const [courses, setCourses] = useState([]); | ||
|
||
useEffect(() => { | ||
const fetchData = async () => { | ||
setLoading(true); | ||
try { | ||
const data = await getMyAlongBlues(); | ||
setCourses(data); | ||
|
||
} catch (error) { | ||
console.error("데이터를 불러오는데 문제가 발생했습니다.", error); | ||
} finally { | ||
setLoading(false); | ||
} | ||
}; | ||
|
||
fetchData(); | ||
}, []); | ||
|
||
return ( | ||
<div className="page-container"> | ||
<PageHeader title={"내 바당따라"} /> | ||
<CourseItemList myPageMode={true} courses = {courses} alongCourse = {false}/> | ||
<Footer /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default MyAlongBlues; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.