mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-02 21:51:51 +08:00
adds Settings index react page
This commit is contained in:
parent
1ce787603e
commit
0f4286d5d1
2 changed files with 10 additions and 10 deletions
|
@ -4,23 +4,23 @@
|
|||
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import PropTypes from 'prop-types'
|
||||
// import PropTypes from 'prop-types'
|
||||
|
||||
const Hello = props => (
|
||||
<div>Hello {props.name}!</div>
|
||||
const Settings = () => (
|
||||
<div>Settings page</div>
|
||||
)
|
||||
|
||||
Hello.defaultProps = {
|
||||
name: 'David'
|
||||
}
|
||||
// Settings.defaultProps = {
|
||||
// name: 'David'
|
||||
// }
|
||||
|
||||
Hello.propTypes = {
|
||||
name: PropTypes.string
|
||||
}
|
||||
// Settings.propTypes = {
|
||||
// name: PropTypes.string
|
||||
// }
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
ReactDOM.render(
|
||||
<Hello name="React" />,
|
||||
<Settings />,
|
||||
document.body.appendChild(document.createElement('div'))
|
||||
)
|
||||
})
|
0
app/views/react/settings/index.html.erb
Normal file
0
app/views/react/settings/index.html.erb
Normal file
Loading…
Reference in a new issue