From 70b5e065a8efc6f3cd3fc5b8e6cf319d3a723d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9=20Bailly-Barthez?= <timothe.barthez@student-cs.fr> Date: Tue, 11 Feb 2020 14:40:02 +0100 Subject: [PATCH] Fetch promotion --- views/index.ejs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/views/index.ejs b/views/index.ejs index b564e27..a76ee03 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -42,7 +42,15 @@ // React.useEffect(() => { // }, [ready, error]) - + + React.useEffect(() => { + axios.post('/get_promotion') + .then(result => { + setPromotionMin(result.data.promotion); + setPromotionMax(result.data.promotion); + }) + }, []) + React.useEffect(() => { setReady(false); setError(false); -- GitLab