mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-12-23 20:39:10 +00:00
v2
This commit is contained in:
@@ -2,20 +2,7 @@ import { useEffect, useState } from "react";
|
||||
import { useHealth } from "src/hooks";
|
||||
import { T } from "src/locale";
|
||||
|
||||
export function SiteFooter() {
|
||||
const health = useHealth();
|
||||
const [latestVersion, setLatestVersion] = useState<string | null>(null);
|
||||
const [isNewVersionAvailable, setIsNewVersionAvailable] = useState(false);
|
||||
|
||||
const getVersion = () => {
|
||||
if (!health.data) {
|
||||
return "";
|
||||
}
|
||||
const v = health.data.version;
|
||||
return `v${v.major}.${v.minor}.${v.revision}`;
|
||||
};
|
||||
|
||||
const compareVersions = (current: string, latest: string): boolean => {
|
||||
const compareVersions = (current: string, latest: string): boolean => {
|
||||
const cleanCurrent = current.replace(/^v/, "");
|
||||
const cleanLatest = latest.replace(/^v/, "");
|
||||
|
||||
@@ -30,6 +17,19 @@ export function SiteFooter() {
|
||||
if (lat < curr) return false;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
export function SiteFooter() {
|
||||
const health = useHealth();
|
||||
const [latestVersion, setLatestVersion] = useState<string | null>(null);
|
||||
const [isNewVersionAvailable, setIsNewVersionAvailable] = useState(false);
|
||||
|
||||
const getVersion = () => {
|
||||
if (!health.data) {
|
||||
return "";
|
||||
}
|
||||
const v = health.data.version;
|
||||
return `v${v.major}.${v.minor}.${v.revision}`;
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user