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() {
|
componentDidMount() {
|
||||||
this.getArticles()
|
this.getArticles()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implémenter la fonction sortArticles :
|
// Implémenter la fonction sortArticles :
|
||||||
sortArticles = (sortType) => {
|
sortArticles = (sortType) => {
|
||||||
|
|
||||||
let sorted;
|
let sorted;
|
||||||
if (sortType === "name"){
|
if (sortType === "name"){
|
||||||
|
|
@ -73,7 +73,7 @@ sortArticles = (sortType) => {
|
||||||
this.setState({onSortedCategories:false})
|
this.setState({onSortedCategories:false})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getArticles = () => {
|
getArticles = () => {
|
||||||
axios.get('https://etud.insa-toulouse.fr/~proximo/v2/api/articles')
|
axios.get('https://etud.insa-toulouse.fr/~proximo/v2/api/articles')
|
||||||
|
|
@ -200,6 +200,7 @@ sortArticles = (sortType) => {
|
||||||
this.handleCloseCategories()
|
this.handleCloseCategories()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (!sessionStorage.getItem('token')){
|
if (!sessionStorage.getItem('token')){
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue