feat: způsob přihlášení a správa obchodů podle konfigurace serveru
CI / Generate TypeScript types (push) Successful in 12s
CI / Server unit tests (push) Successful in 26s
CI / Build server (push) Successful in 32s
CI / Build client (push) Successful in 41s
CI / Playwright E2E tests (push) Successful in 1m47s
CI / Build and push Docker image (push) Successful in 49s
CI / Notify (push) Successful in 2s
CI / Generate TypeScript types (push) Successful in 12s
CI / Server unit tests (push) Successful in 26s
CI / Build server (push) Successful in 32s
CI / Build client (push) Successful in 41s
CI / Playwright E2E tests (push) Successful in 1m47s
CI / Build and push Docker image (push) Successful in 49s
CI / Notify (push) Successful in 2s
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
import { useSyncExternalStore } from "react";
|
||||
import { getGroupLimits, subscribeGroupLimits } from "../utils/appConfig";
|
||||
import { getAppConfig, getGroupLimits, subscribeAppConfig } from "../utils/appConfig";
|
||||
|
||||
/** Aktuální limity skupinových objednávek (překreslí se po načtení konfigurace ze serveru). */
|
||||
export function useGroupLimits() {
|
||||
return useSyncExternalStore(subscribeGroupLimits, getGroupLimits);
|
||||
return useSyncExternalStore(subscribeAppConfig, getGroupLimits);
|
||||
}
|
||||
|
||||
/** Celá runtime konfigurace ze serveru (způsob přihlášení, zapnuté funkce, limity). */
|
||||
export function useAppConfig() {
|
||||
return useSyncExternalStore(subscribeAppConfig, getAppConfig);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user