diff --git a/part1/src/App.js b/part1/src/App.js index 2bbce39..29e1e36 100644 --- a/part1/src/App.js +++ b/part1/src/App.js @@ -1,7 +1,7 @@ const Header = (props) => { return (

- {props.course} + {props.course.course}

) } @@ -20,15 +20,15 @@ const Part = (props) => { const Content = (props) => { return ( <> - - - + + + ) } const Total = (props) => { - const total = props.parts[0].exercises + props.parts[1].exercises + props.parts[2].exercises + const total = props.course.parts[0].exercises + props.course.parts[1].exercises + props.course.parts[2].exercises return ( <>

@@ -39,7 +39,7 @@ const Total = (props) => { } const App = () => { - const course = 'Half Stack application development' + const title = 'Half Stack application development' const part1 = { name: 'Fundamentals of React', exercises: 10 @@ -53,12 +53,16 @@ const App = () => { exercises: 14 } const parts = [part1, part2, part3] + const course = { + course: title, + parts: parts + } return (

- - + +
) }