Clean up
This commit is contained in:
parent
5438cfc3ff
commit
cd43b022ba
|
@ -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({
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -15,7 +15,6 @@ registerRoute('/share-target', async ({ event }) => {
|
|||
setTimeout(() => {
|
||||
client.postMessage({ files, action: 'upload-files' });
|
||||
}, 1000);
|
||||
console.log(client);
|
||||
}());
|
||||
return Response.redirect('./');
|
||||
}, 'POST');
|
||||
|
|
Loading…
Reference in a new issue