From cbc909aef12b0dae45e021d22e23599e33bd55f0 Mon Sep 17 00:00:00 2001 From: Aji Kamaludin Date: Sat, 21 Aug 2021 08:35:22 +0700 Subject: [PATCH] dashboard implemented --- src/views/dashboard/Api.js | 17 +++++++++++++++++ src/views/dashboard/Dashboard.js | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/views/dashboard/Api.js diff --git a/src/views/dashboard/Api.js b/src/views/dashboard/Api.js new file mode 100644 index 0000000..8fa44bb --- /dev/null +++ b/src/views/dashboard/Api.js @@ -0,0 +1,17 @@ +import axios from 'axios'; + +export function getSummary(token) { + return axios({ + method: 'GET', + url: `/dashboard`, + headers: { + Authorization: `Bearer ${token}`, + }, + }) + .then((res) => { + return res.data; + }) + .catch((err) => { + throw err.response; + }); +} \ No newline at end of file diff --git a/src/views/dashboard/Dashboard.js b/src/views/dashboard/Dashboard.js index 931fd47..47bf69b 100644 --- a/src/views/dashboard/Dashboard.js +++ b/src/views/dashboard/Dashboard.js @@ -102,7 +102,7 @@ export default function Dashboard(props) { )} - + @@ -112,7 +112,7 @@ export default function Dashboard(props) { - +