- Renamed all slice names (createSlice `name` attribute) to match their file names (e.g. loopChartSlice, authSlice, kueDataSlice etc.) - Updated `store.ts` to register each reducer with consistent key names (e.g. state.loopChartSlice instead of state.loopChart) - Adjusted all `useSelector` and Redux state accesses across the codebase - Improves maintainability, searchability and consistency across files and Redux DevTools
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
"use client"; // components/main/uebersicht/VersionInfo.tsx
|
|
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.systemSettingsSlice.appVersion) ||
|
|
"Unbekannt";
|
|
const webVersion = useSelector(
|
|
(state: RootState) => state.webVersionSlice.version
|
|
); // Webversion aus Redux holen
|
|
|
|
return (
|
|
<div className="bg-gray-50 p-4 rounded-lg shadow-sm border border-gray-200 w-full laptop:p-2">
|
|
<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;
|