mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-19 22:19:49 -04:00
* A hint of file drop * backport from #671 * accept/reject Spacedrop working * final cleanup * Rename spacedrop.tsx to Spacedrop.tsx * Update index.tsx
12 lines
314 B
TypeScript
12 lines
314 B
TypeScript
import { proxy, subscribe, useSnapshot } from 'valtio';
|
|
|
|
const state = proxy({
|
|
droppedFiles: [] as string[]
|
|
});
|
|
|
|
export const useSpacedropState = () => useSnapshot(state);
|
|
|
|
export const getSpacedropState = () => state;
|
|
|
|
export const subscribeSpacedropState = (callback: () => void) => subscribe(state, callback);
|