Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit d0b9fdf

Browse files
author
Alan Shaw
committed
fix: examples
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 347e973 commit d0b9fdf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/bundle-browserify/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var ipfs = IPFS()
66

77
function store () {
88
var toStore = document.getElementById('source').value
9-
ipfs.files.add(Buffer.from(toStore), function (err, res) {
9+
ipfs.add(Buffer.from(toStore), function (err, res) {
1010
if (err || !res) {
1111
return console.error('ipfs add error', err, res)
1212
}
@@ -21,7 +21,7 @@ function store () {
2121
}
2222

2323
function display (hash) {
24-
ipfs.files.cat(hash, function (err, res) {
24+
ipfs.cat(hash, function (err, res) {
2525
if (err || !res) {
2626
return console.error('ipfs cat error', err, res)
2727
}

examples/bundle-webpack/src/App.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ class App extends React.Component {
2828
ipfs.add([Buffer.from(stringToUse)], (err, res) => {
2929
if (err) throw err
3030
const hash = res[0].hash
31-
this.setState({added_file_hash: hash})
31+
this.setState({ added_file_hash: hash })
3232
ipfs.cat(hash, (err, data) => {
3333
if (err) throw err
34-
this.setState({added_file_contents: data.toString()})
34+
this.setState({ added_file_contents: data.toString() })
3535
})
3636
})
3737
}
3838
render () {
39-
return <div style={{textAlign: 'center'}}>
39+
return <div style={{ textAlign: 'center' }}>
4040
<h1>Everything is working!</h1>
4141
<p>Your ID is <strong>{this.state.id}</strong></p>
4242
<p>Your IPFS version is <strong>{this.state.version}</strong></p>

0 commit comments

Comments
 (0)