moved dropzone to gallery to avoid trigerring it on login page
This commit is contained in:
parent
c3ada5c6f7
commit
93ca29e0b8
|
@ -19,7 +19,8 @@ const DropDiv = styled.div`
|
|||
|
||||
const Overlay = styled.div<{ isDragActive: boolean }>`
|
||||
border-width: 8px;
|
||||
|
||||
left: 0;
|
||||
top: 0;
|
||||
outline: none;
|
||||
transition: border 0.24s ease-in-out;
|
||||
height: 100%;
|
||||
|
|
|
@ -222,10 +222,7 @@ export default function App({ Component, pageProps, err }) {
|
|||
accept: 'image/*, video/*, application/json, ',
|
||||
});
|
||||
return (
|
||||
<FullScreenDropZone
|
||||
getRootProps={getRootProps}
|
||||
getInputProps={getInputProps}
|
||||
>
|
||||
<>
|
||||
<Head>
|
||||
<title>{constants.TITLE}</title>
|
||||
<script async src={`https://sa.ente.io/latest.js`} />
|
||||
|
@ -252,6 +249,8 @@ export default function App({ Component, pageProps, err }) {
|
|||
</Container>
|
||||
) : (
|
||||
<Component
|
||||
getRootProps={getRootProps}
|
||||
getInputProps={getInputProps}
|
||||
openFileUploader={open}
|
||||
acceptedFiles={acceptedFiles}
|
||||
uploadModalView={uploadModalView}
|
||||
|
@ -261,6 +260,6 @@ export default function App({ Component, pageProps, err }) {
|
|||
err={err}
|
||||
/>
|
||||
)}
|
||||
</FullScreenDropZone>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import {
|
|||
import constants from 'utils/strings/constants';
|
||||
import AlertBanner from './components/AlertBanner';
|
||||
import { Alert, Button, Jumbotron } from 'react-bootstrap';
|
||||
import FullScreenDropZone from 'components/FullScreenDropZone';
|
||||
|
||||
const DATE_CONTAINER_HEIGHT = 45;
|
||||
const IMAGE_CONTAINER_HEIGHT = 200;
|
||||
|
@ -111,6 +112,8 @@ const DateContainer = styled.div`
|
|||
`;
|
||||
|
||||
interface Props {
|
||||
getRootProps;
|
||||
getInputProps;
|
||||
openFileUploader;
|
||||
acceptedFiles;
|
||||
uploadModalView;
|
||||
|
@ -337,7 +340,10 @@ export default function Gallery(props: Props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<FullScreenDropZone
|
||||
getRootProps={props.getRootProps}
|
||||
getInputProps={props.getInputProps}
|
||||
>
|
||||
<LoadingBar color="#2dc262" ref={loadingBar} />
|
||||
{isFirstLoad && (
|
||||
<div className="text-center">
|
||||
|
@ -526,6 +532,6 @@ export default function Gallery(props: Props) {
|
|||
{constants.INSTALL_MOBILE_APP()}
|
||||
</Alert>
|
||||
)}
|
||||
</>
|
||||
</FullScreenDropZone>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue