mirror of
https://github.com/edumeet/edumeet.git
synced 2026-07-29 14:00:16 +00:00
18 lines
No EOL
390 B
JavaScript
18 lines
No EOL
390 B
JavaScript
import React from 'react';
|
|
import WebTorrent from 'webtorrent';
|
|
import dragDrop from 'drag-drop';
|
|
import { shareFiles } from './index';
|
|
|
|
export const configureDragDrop = () =>
|
|
{
|
|
if (WebTorrent.WEBRTC_SUPPORT)
|
|
{
|
|
dragDrop('body', async (files) => await shareFiles(files));
|
|
}
|
|
};
|
|
|
|
export const HoldingOverlay = () => (
|
|
<div id='holding-overlay'>
|
|
Drop files here to share them
|
|
</div>
|
|
); |