feat: link changelog url to footer version

This commit is contained in:
prafull-opensignlabs
2024-02-14 19:05:00 +05:30
parent 9114908521
commit 13845adbd5
2 changed files with 15 additions and 4 deletions
+10 -2
View File
@@ -1,6 +1,8 @@
import React, { useEffect, useState } from "react";
import Package from "../../package.json";
import axios from "axios";
import { NavLink } from "react-router-dom";
import { openInNewTab } from "../constant/Utils";
const Footer = () => {
const [showButton, setShowButton] = useState(false);
const [version, setVersion] = useState("");
@@ -37,12 +39,18 @@ const Footer = () => {
}, []);
const appName = "OpenSign™";
const openUrl = () => {
openInNewTab(
"https://github.com/OpenSignLabs/OpenSign/releases/tag/" + version
);
};
return (
<>
<div className="bg-[#222c3c] text-[#98a6ba] text-center text-[13px] py-3">
All Rights Reserved &copy; {new Date().getFullYear()} &nbsp;
{appName} ( version: {version ? version : `${Package.version} `})
<span onClick={openUrl} className="hover:underline cursor-pointer">
{appName} ( version: {version ? version : `${Package.version} `})
</span>
</div>
<button
className={`${
@@ -5,6 +5,7 @@ import axios from "axios";
import "../styles/report.css";
import ModalUi from "./ModalUi";
import AppendFormInForm from "../components/AppendFormInForm";
import { modalSubmitBtnColor, modalCancelBtnColor } from "../constant/const";
const ReportTable = ({
ReportName,
List,
@@ -342,13 +343,15 @@ const ReportTable = ({
<div className="flex items-center mt-3 gap-2 text-white">
<button
onClick={() => handleDelete(item)}
className="bg-[#1ab6ce] rounded-sm shadow-md text-[12px] font-semibold uppercase text-white py-1.5 px-3 focus:outline-none"
className="px-4 py-1.5 text-white rounded shadow-md text-center focus:outline-none "
style={{ backgroundColor: modalSubmitBtnColor }}
>
Yes
</button>
<button
onClick={handleCloseDeleteModal}
className="bg-[#188ae2] rounded-sm shadow-md text-[12px] font-semibold uppercase text-white py-1.5 px-3 text-center ml-[2px] focus:outline-none"
className="px-4 py-1.5 text-black border-[1px] border-[#ccc] shadow-md rounded focus:outline-none"
style={{ backgroundColor: modalCancelBtnColor }}
>
No
</button>