Skip to content

Commit

Permalink
[fix] prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
winor30 committed Nov 8, 2020
1 parent 117d081 commit b813908
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion example/react-app/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
}

.App-button {
margin-left: 8px
margin-left: 8px;
}
20 changes: 10 additions & 10 deletions example/react-app/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@ import { getResolver } from 'web-did-resolver'

const webDidResolver = getResolver()
const didResolver = new Resolver(webDidResolver)
function App () {
function App() {
const [did, setDid] = useState('did:web:identity.foundation')
const [resolved, setResolved] = useState();
const [resolved, setResolved] = useState()
return (
<div className='App'>
<div className="App">
<label>DID:</label>
<input
type='text'
type="text"
value={did}
onChange={event => {
onChange={(event) => {
setDid(event.target.value)
}}
/>
<button
className="App-button"
type='submit'
type="submit"
onClick={() => {
didResolver
.resolve(did)
.then((res) => {
console.log('resolved data', res);
setResolved(true);
console.log('resolved data', res)
setResolved(true)
})
.catch((err) => {
console.error('failed to resolve', err);
setResolved(false);
console.error('failed to resolve', err)
setResolved(false)
})
}}
>
Expand Down
10 changes: 5 additions & 5 deletions example/react-app/src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import React from 'react'
import ReactDOM from 'react-dom'
import './index.css'
import App from './App'

ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
)

0 comments on commit b813908

Please sign in to comment.