mirror of
https://github.com/10h30/fullstackopen.git
synced 2026-06-05 15:08:33 +09:00
Completed 1.5
This commit is contained in:
+7
-5
@@ -1,8 +1,9 @@
|
||||
import React from 'react'
|
||||
|
||||
const App = () => {
|
||||
const course = 'Half Stack application development'
|
||||
const parts = [
|
||||
const course = {
|
||||
name: 'Half Stack application development',
|
||||
parts: [
|
||||
{
|
||||
name: 'Fundamentals of React',
|
||||
exercises: 10
|
||||
@@ -16,19 +17,20 @@ const App = () => {
|
||||
exercises: 14
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Header course={course} />
|
||||
<Content part={parts} />
|
||||
<Total part={parts} />
|
||||
<Content part={course.parts} />
|
||||
<Total part={course.parts} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const Header = (props) => {
|
||||
return (
|
||||
<h1>{props.course}</h1>
|
||||
<h1>{props.course.name}</h1>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user