Feature/user log entrance

This commit is contained in:
2025-01-01 13:25:58 +00:00
committed by AmirHossein Mahmoodi
parent 90d22be093
commit 7671fddc84
24 changed files with 558 additions and 277 deletions

View File

@@ -0,0 +1,30 @@
"use client";
import useRequest from "@/lib/hooks/useRequest";
import { useEffect } from "react";
import { ACTIVITY_LOG } from "@/core/utils/routes";
const ActivityCodeLog = ({ activity_code }) => {
const requestServer = useRequest({ notificationShow: false });
useEffect(() => {
if (!activity_code) return;
const fetchSubItems = async () => {
try {
await requestServer(ACTIVITY_LOG, "post", {
data: {
activityCode: activity_code,
},
});
} catch (error) {
console.error(error); // Always helpful to log the error for debugging.
}
};
fetchSubItems();
}, [activity_code, requestServer]);
return null; // Ensure the component still renders something.
};
export default ActivityCodeLog;