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 Course from "./components/Course";
|
||||||
import Content from "./components/Content";
|
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
const course = {
|
const course = {
|
||||||
|
|
@ -25,10 +24,9 @@ const App = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<Header course={course.name} />
|
<Course course={course}/>
|
||||||
<Content sections={course.sections} />
|
</>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
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