chore: set image raw size to form

This commit is contained in:
jialin
2025-01-18 16:03:48 +08:00
parent 47ced11e03
commit 82e8c01b95
5 changed files with 99 additions and 22 deletions
+18
View File
@@ -0,0 +1,18 @@
// broadcast channel hook
import { useEffect, useRef } from 'react';
export const useBroadcast = () => {
const broadcastChannel = useRef<BroadcastChannel | null>(null);
useEffect(() => {
broadcastChannel.current = new BroadcastChannel('broadcast_channel');
return () => {
broadcastChannel.current?.close();
console.log('broadcast channel closed');
};
}, []);
return { broadcastChannel };
};