mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2025-05-12 09:31:07 +08:00
Recent transactions and total products now functional in dashboard
This commit is contained in:
parent
3344ec1510
commit
3b565cfd34
4 changed files with 55 additions and 55 deletions
|
@ -57,6 +57,19 @@ export function UpdateProduct(product: UpdateProductParams) {
|
|||
});
|
||||
}
|
||||
|
||||
export function GetLogs() {
|
||||
const token = JSON.parse(localStorage.getItem("token") || "{}");
|
||||
return axios
|
||||
.get("http://localhost:8000/api/v1/logs/", {
|
||||
headers: {
|
||||
Authorization: "Token " + token,
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
return response.data;
|
||||
});
|
||||
}
|
||||
|
||||
export function AddProduct(note: AddProductParams) {
|
||||
const token = JSON.parse(localStorage.getItem("token") || "{}");
|
||||
return axios
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
import React, { useEffect } from "react";
|
||||
import React from "react";
|
||||
import Sidebar from "../Sidebar/Sidebar";
|
||||
import Header from "../Header/Header";
|
||||
import styles from "../../styles";
|
||||
import { CheckSavedSession, UserInfo } from "../Api/Api";
|
||||
import { toggle_login } from "../../Features/Redux/Slices/Login/LoginSlice";
|
||||
import { SetUser } from "../../Features/Redux/Slices/LoggedInUserSlice/LoggedInUserSlice";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { LoginState } from "../../Interfaces/Interfaces";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import PreviousSessionChecker from "../PreviousSessionChecker/PreviousSessionChecker";
|
||||
|
||||
export interface props {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue