fix some hooks, fix dragndrop example

This commit is contained in:
peterkogo
2024-12-12 16:43:42 +01:00
parent d2fd846c67
commit efa163203c
6 changed files with 17 additions and 17 deletions
@@ -1,18 +0,0 @@
import { useStore } from '$lib/store';
import type { ConnectionState } from '@xyflow/system';
import { derivedWarning } from './derivedWarning.svelte';
/**
* Hook for receiving the current connection.
*
* @public
* @returns current connection as a readable store
*/
export function useConnection(): ConnectionState {
if (process.env.NODE_ENV === 'development') {
derivedWarning('useConnection', true);
}
return useStore().connection;
}