fixed Bug: redirecting
Also removed irrelavant console.logs
This commit is contained in:
@@ -63,7 +63,6 @@ const APIKeyTable: React.FC = () => {
|
||||
}
|
||||
);
|
||||
const data = await response.json();
|
||||
console.log(data);
|
||||
return data;
|
||||
} catch (error) {
|
||||
setError("error", "Failed to fetch items", "There is an error");
|
||||
|
||||
@@ -85,7 +85,6 @@ const UserTable: React.FC = () => {
|
||||
setIsLoading(true);
|
||||
try {
|
||||
const data = await fetchUserData();
|
||||
console.log(data);
|
||||
if (Array.isArray(data)) {
|
||||
setUsers(data);
|
||||
} else {
|
||||
|
||||
@@ -167,7 +167,6 @@ export const createItem = async (
|
||||
can_borrow_role: number,
|
||||
lockerNumber: string | null
|
||||
) => {
|
||||
console.log(JSON.stringify({ item_name, can_borrow_role, lockerNumber }));
|
||||
try {
|
||||
const response = await fetch(
|
||||
`${API_BASE}/api/admin/item-data/create-item`,
|
||||
|
||||
Reference in New Issue
Block a user