corrections apres merge

This commit is contained in:
Florian Ehr 2021-02-03 16:39:00 +01:00
parent 0f7ba3bedd
commit cbb2ef80bb

View file

@ -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')){