update system messages

This commit is contained in:
RoyceDa
2026-01-31 02:59:35 +02:00
parent ad696616e1
commit 1a6b88fc5a
6 changed files with 97 additions and 27 deletions

View File

@@ -0,0 +1,30 @@
import { useContext } from "react";
import { SystemProviderContext } from "./SystemProvider";
/**
* Информация о системе и устройстве
*/
export interface SystemInformation {
/**
* Уникальный обезличенный идентификатор устройства
*/
id: string;
/**
* Имя устройства
*/
name: string;
/**
* Операционная система устройства
*/
os: string;
}
export function useSystemInformation() : SystemInformation {
const context = useContext(SystemProviderContext);
if(!context) {
throw new Error("useSystemInformation must be used within a SystemProvider");
}
return context as SystemInformation;
}