Refactor KeepOnline logic and add useKeepOnline hook
Moved dashboard path check from KeepOnline to a new KeepOnlineWrapper component for cleaner separation of concerns. Introduced a reusable useKeepOnline hook to encapsulate the online status update logic. Updated layout to use KeepOnlineWrapper and simplified KeepOnline. Minor cleanup in broadcast-dialog.tsx.
This commit is contained in:
@@ -29,7 +29,6 @@ export default function BroadcastDialog({ open, setOpen }: BroadcastDialogProps)
|
||||
const handleImageSelect = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const file = event.target.files?.[0];
|
||||
if (file) {
|
||||
// Magic 10 MB Limit
|
||||
if (file.size > 10 * 1024 * 1024) {
|
||||
toast.error("Image size must be less than 10MB");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user