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) { - +