added sounds, updated nped config and tweaks + code quality improvements
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { SystemValues } from "../../../types/types";
|
||||
import { CAM_BASE } from "../../../utils/config";
|
||||
|
||||
export async function handleSystemSave(values: SystemValues) {
|
||||
const payload = {
|
||||
@@ -16,7 +17,7 @@ export async function handleSystemSave(values: SystemValues) {
|
||||
};
|
||||
|
||||
try {
|
||||
const response = await fetch("http://192.168.75.11/api/update-config", {
|
||||
const response = await fetch(`${CAM_BASE}/api/update-config`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -39,7 +40,7 @@ export async function handleSystemSave(values: SystemValues) {
|
||||
}
|
||||
|
||||
export async function handleSystemRecall() {
|
||||
const url = "http://192.168.75.11/api/fetch-config?id=GLOBAL--Device";
|
||||
const url = `${CAM_BASE}/api/fetch-config?id=GLOBAL--Device`;
|
||||
|
||||
const controller = new AbortController();
|
||||
const timeoutId = setTimeout(() => controller.abort(), 7000);
|
||||
|
||||
@@ -8,7 +8,6 @@ import { useSystemConfig } from "../../../hooks/useSystemConfig";
|
||||
|
||||
const SystemConfigFields = () => {
|
||||
const { saveSystemSettings, systemSettingsData } = useSystemConfig();
|
||||
|
||||
const initialvalues: SystemValues = {
|
||||
deviceName: systemSettingsData?.deviceName ?? "",
|
||||
timeZone: systemSettingsData?.timeZone ?? "",
|
||||
|
||||
Reference in New Issue
Block a user