From 2b6c8f702a9ab18a68d32469ed21b44123ba541d Mon Sep 17 00:00:00 2001 From: Rene Pot Date: Wed, 29 Nov 2023 10:07:56 +0100 Subject: [PATCH] docs: properly change notices for docusaurus --- docs/advanced/offline/useOnlineStatus.md | 4 +++- docs/advanced/services.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/advanced/offline/useOnlineStatus.md b/docs/advanced/offline/useOnlineStatus.md index 8491b5904..4e3e4b407 100644 --- a/docs/advanced/offline/useOnlineStatus.md +++ b/docs/advanced/offline/useOnlineStatus.md @@ -1,6 +1,8 @@ # useOnlineStatus -!> This hook only detects whether or not you're connected to the internet, which could be problematic for DHIS2 instances that are hosted locally or offline, where what really matters is whether or not you can communicate with the DHIS2 server. The [`useDhis2ConnectionStatus` hook](./useDhis2ConnectionStatus.md) is usually better for that reason, and is therefore recommended. +:::info Internet Only +This hook only detects whether or not you're connected to the internet, which could be problematic for DHIS2 instances that are hosted locally or offline, where what really matters is whether or not you can communicate with the DHIS2 server. The [`useDhis2ConnectionStatus` hook](./useDhis2ConnectionStatus.md) is usually better for that reason, and is therefore recommended. +::: The `useOnlineStatus` returns whether the client is online or offline. It debounces the returned values by default to prevent rapid changes of any UI elements that depend on the online status. diff --git a/docs/advanced/services.md b/docs/advanced/services.md index 7462f7832..7e9646591 100644 --- a/docs/advanced/services.md +++ b/docs/advanced/services.md @@ -1,6 +1,8 @@ # Services -!> **NOTE**
Services are purely a concept **internal** to `@dhis2/app-runtime` - you don't need to care about them to use it. +:::caution Note +Services are purely a concept **internal** to `@dhis2/app-runtime` - you don't need to care about them to use it. +::: Internally, `@dhis2/app-runtime` is composed of several functionally-isolated **services**. Each of these services is a private (unpublished) npm package which is bundled into the final `@dhis2/app-runtime` library at build-time. Each services exposes a relevant Context provider as well as various Hook and Component interfaces which are re-exported by the `@dhis2/app-runtime` public package. There are currently only 2 services, but more will be added soon.