MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / OutputNode

Function OutputNode

audio-flow/src/components/OutputNode.tsx:5–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { toggleAudio } from '../Audio';
4
5export function OutputNode() {
6 const [isRunning, setIsRuning] = useState(false);
7
8 return <div className={'bg-white shadow-xl p-[20px]'}>
9 <Handle className='w-[10px] h-[10px]' type="target" position={Position.Top} />
10
11 <div>
12 <p>输出节点</p>
13 <button onClick={() => {
14 setIsRuning(isRunning => !isRunning)
15 toggleAudio();
16 }}>
17 {isRunning ? (
18 <span role="img">
19 🔈
20 </span>
21 ) : (
22 <span role="img">
23 🔇
24 </span>
25 )}
26 </button>
27 </div>
28 </div>
29}

Callers

nothing calls this directly

Calls 2

useStateFunction · 0.90
toggleAudioFunction · 0.90

Tested by

no test coverage detected