add course component
This commit is contained in:
parent
3864c11b9b
commit
9c6404421a
2 changed files with 17 additions and 6 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import Header from "./components/Header";
|
||||
import Content from "./components/Content";
|
||||
import Course from "./components/Course";
|
||||
|
||||
const App = () => {
|
||||
const course = {
|
||||
|
|
@ -25,10 +24,9 @@ const App = () => {
|
|||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Header course={course.name} />
|
||||
<Content sections={course.sections} />
|
||||
</div>
|
||||
<>
|
||||
<Course course={course}/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
13
parts/2/courseExercise/src/components/Course.jsx
Normal file
13
parts/2/courseExercise/src/components/Course.jsx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import Header from "./Header";
|
||||
import Content from "./Content";
|
||||
|
||||
const Course = ({course}) => {
|
||||
return (
|
||||
<div>
|
||||
<Header course={course.name} />
|
||||
<Content sections={course.sections} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Course;
|
||||
Loading…
Add table
Add a link
Reference in a new issue