VersionInfo ausgelagert

This commit is contained in:
Ismail Ali
2025-02-13 21:09:19 +01:00
parent 03c434dc5a
commit fbed871dc5
3 changed files with 37 additions and 25 deletions

View File

@@ -0,0 +1,34 @@
"use client";
import React from "react";
import { Icon } from "@iconify/react";
import { useSelector } from "react-redux";
import { RootState } from "../../../redux/store";
const VersionInfo: React.FC = () => {
const appVersion =
useSelector((state: RootState) => state.variables.appVersion) ||
"Unbekannt";
const webVersion = useSelector(() => "1.0.0"); // Falls `webVersion` aus einer Config kommt
return (
<div className="bg-gray-50 p-4 rounded-lg shadow-sm border border-gray-200 w-full">
<h2 className="text-lg font-semibold text-gray-700 mb-2">
Versionsinformationen
</h2>
<div className="flex flex-row p-2 space-x-2">
<Icon icon="bx:code-block" className="text-xl text-blue-400" />
<p className="text-sm text-gray-600">
Applikationsversion: {appVersion}
</p>
</div>
<div className="flex flex-row p-2 space-x-2">
<Icon icon="mdi:web" className="text-xl text-blue-400" />
<p className="text-sm text-gray-600">Webversion: {webVersion}</p>
</div>
</div>
);
};
export default VersionInfo;