mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-24 08:01:38 +00:00
203f6785c4
Split SvelteKit-specific code into separate files to allow windmill-components to be used as a library in non-SvelteKit contexts (e.g., windmill-react-sdk): - Split logout.ts into logout.ts and logoutKit.ts - Split svelte5Utils.svelte.ts into svelte5Utils.svelte.ts and svelte5UtilsKit.svelte.ts (for runed/kit useSearchParams) - Fix triggers/utils.ts type-only import resolution - Update FlowRestartButton to use callback instead of direct navigation - Update all route files to import from logoutKit Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
13 lines
307 B
TypeScript
13 lines
307 B
TypeScript
import { UserService } from '$lib/gen'
|
|
import { clearStores } from './storeUtils'
|
|
|
|
// Note: logout and logoutWithRedirect have been moved to logoutKit.ts
|
|
// as they depend on SvelteKit navigation
|
|
|
|
export async function clearUser() {
|
|
try {
|
|
clearStores()
|
|
await UserService.logout()
|
|
} catch (error) {}
|
|
}
|