This commit is contained in:
Pushkar Anand 2021-06-07 02:51:55 +05:30
parent 5438cfc3ff
commit cd43b022ba
3 changed files with 5 additions and 7 deletions

View file

@ -48,7 +48,6 @@ export default function Upload(props: Props) {
const appContext = useContext(AppContext);
useEffect(() => {
console.log('acceptedFiles', props.acceptedFiles);
if (props.acceptedFiles?.length > 0) {
props.setLoading(true);
props.setCollectionSelectorAttributes({

View file

@ -152,6 +152,11 @@ const GlobalStyles = createGlobalStyle`
background-size: 20px 20px;
background-position: center;
}
.share-btn{
background: url('/share_icon.png') no-repeat;
background-size: 20px 20px;
background-position: center;
}
.btn-success {
background: #2dc262;
border-color: #29a354;
@ -365,13 +370,8 @@ export default function App({ Component, err }) {
if (event.data.action === 'upload-files') {
const files = event.data.files;
setFiles(files);
console.log(files);
}
};
navigator.serviceWorker.onmessageerror = (event) => {
console.log(event);
};
}
// if ('serviceWorker' in navigator) {

View file

@ -15,7 +15,6 @@ registerRoute('/share-target', async ({ event }) => {
setTimeout(() => {
client.postMessage({ files, action: 'upload-files' });
}, 1000);
console.log(client);
}());
return Response.redirect('./');
}, 'POST');