Welcome
Overview
useWelcome() displays a welcome prompt dialog (KWelcomePrompt) automatically after each login and hides it on logout. It respects a user preference stored in LocalStorage (key 'welcome') and a configuration flag (config.layout.welcome, default true).
Usage
javascript
import { useWelcome } from '@kalisio/kdk/core.client'
// Typically called once in the root App or layout component
useWelcome()No return value is exposed — the composable operates entirely through side effects.
Behaviour
- After a successful login (
apiemits'login'), shows theKWelcomePromptdialog — unlessLocalStorage.get('welcome')isfalseorconfig.layout.welcomeisfalse. - After a logout (
apiemits'logout'), dismisses the dialog if it is open.
Lifecycle
beforeUnmount: removes theloginandlogoutAPI event listeners.