mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
chore: move sandbox to apps/ (#1171)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { getInitialSource, onSourceChange } from '@app/shared/sandbox-listener';
|
||||
import type { SourceId } from '@app/shared/sources';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export function useSource(audioOnly?: boolean): SourceId {
|
||||
const [source, setSource] = useState(() => getInitialSource(audioOnly));
|
||||
useEffect(() => onSourceChange(setSource), []);
|
||||
return source;
|
||||
}
|
||||
Reference in New Issue
Block a user