diff --git a/example.env.local b/example.env.local index 3c99d5d..4474c59 100644 --- a/example.env.local +++ b/example.env.local @@ -1,5 +1,5 @@ NEXT_PUBLIC_API_NAME = "Loan Facilities Dashboard" -NEXT_PUBLIC_API_VERSION = "1.30.0" +NEXT_PUBLIC_API_VERSION = "1.30.1" NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa" NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl" diff --git a/src/components/dashboard/loan-history/Form/HistoryForm/PrintHistory.jsx b/src/components/dashboard/loan-history/Form/HistoryForm/PrintHistory.jsx index 438bff5..9028919 100644 --- a/src/components/dashboard/loan-history/Form/HistoryForm/PrintHistory.jsx +++ b/src/components/dashboard/loan-history/Form/HistoryForm/PrintHistory.jsx @@ -3,33 +3,24 @@ import {useTranslations} from "next-intl"; import {useState} from "react"; import useRequest from "@/lib/app/hooks/useRequest"; import DescriptionIcon from '@mui/icons-material/Description'; +import Link from "next/link"; const PrintHistory = ({attachment}) => { const t = useTranslations(); - const [loading, setLoading] = useState(false) - const requestServer = useRequest({auth: true, pending: false, success: {notification: {show: false}}}) - const clickHandler = (attachment) => { - const anchor = document.createElement('a'); - anchor.href = attachment; - anchor.setAttribute('download', ''); - document.body.appendChild(anchor); - anchor.click(); - document.body.removeChild(anchor); - } - - - return () + return ( + + ); } export default PrintHistory \ No newline at end of file