This commit is contained in:
matteo
2018-11-21 21:16:01 +01:00
2 changed files with 24 additions and 2 deletions
+2 -2
View File
@@ -42,8 +42,8 @@ class TopBar extends Component {
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav">
<Nav className="mr-auto">
<Nav.Link href="#home" className="text-light">Home</Nav.Link>
<Nav.Link href="#link" className="text-light">Link</Nav.Link>
<Link to="/" className="text-light nav-link">Home</Link>
<Link to="/link" className="text-light nav-link">link</Link>
<NavDropdown title="arnaldo" id="basic-nav-dropdown" >
<NavDropdown.Item href="#action/3.1">Action</NavDropdown.Item>
<NavDropdown.Item href="#action/3.2">
+22
View File
@@ -0,0 +1,22 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
axios.get('http://site1825.tw.cs.unibo.it/TW/globpop',
{
id: videoID // variabile con videoid
})
.then(
response => { // notazione moderna javascript per indicare function(response){}
// function(response){} == response => {}
console.log(response);
console.info(response.data);
},
// Note: it's important to handle errors here
// instead of a catch() block so that we don't swallow
// exceptions from actual bugs in components.
error => {
console.error(error);
}
);
export default fvitali;