corrections apres merge
This commit is contained in:
parent
0f7ba3bedd
commit
cbb2ef80bb
1 changed files with 40 additions and 39 deletions
|
@ -42,10 +42,10 @@ export default class Stock extends React.Component {
|
|||
|
||||
componentDidMount() {
|
||||
this.getArticles()
|
||||
}
|
||||
}
|
||||
|
||||
// Implémenter la fonction sortArticles :
|
||||
sortArticles = (sortType) => {
|
||||
// Implémenter la fonction sortArticles :
|
||||
sortArticles = (sortType) => {
|
||||
|
||||
let sorted;
|
||||
if (sortType === "name"){
|
||||
|
@ -73,7 +73,7 @@ sortArticles = (sortType) => {
|
|||
this.setState({onSortedCategories:false})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getArticles = () => {
|
||||
axios.get('https://etud.insa-toulouse.fr/~proximo/v2/api/articles')
|
||||
|
@ -200,6 +200,7 @@ sortArticles = (sortType) => {
|
|||
this.handleCloseCategories()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
if (!sessionStorage.getItem('token')){
|
||||
|
|
Loading…
Reference in a new issue