remove club by capture time option [dedupe screen] (#1326)

This commit is contained in:
Abhinav Kumar 2023-08-29 10:56:01 +05:30 committed by GitHub
commit 30129d413e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,7 @@
import { FluidContainer } from 'components/Container';
import { SelectionBar } from '../../Navbar/SelectionBar';
import React, { useContext } from 'react';
import { Box, IconButton, styled, Tooltip } from '@mui/material';
import { DeduplicateContext } from 'pages/deduplicate';
import { useContext } from 'react';
import { Box, IconButton, Tooltip } from '@mui/material';
import { AppContext } from 'pages/_app';
import CloseIcon from '@mui/icons-material/Close';
import BackButton from '@mui/icons-material/ArrowBackOutlined';
@ -11,20 +10,6 @@ import { getTrashFilesMessage } from 'utils/ui';
import { t } from 'i18next';
import { formatNumber } from 'utils/number/format';
const VerticalLine = styled('div')`
position: absolute;
width: 1px;
top: 0;
bottom: 0;
background: #303030;
`;
const CheckboxText = styled('div')`
margin-left: 0.5em;
font-size: 16px;
margin-right: 0.8em;
`;
interface IProps {
deleteFileHelper: () => void;
close: () => void;
@ -38,7 +23,6 @@ export default function DeduplicateOptions({
count,
clearSelection,
}: IProps) {
const deduplicateContext = useContext(DeduplicateContext);
const { setDialogMessage } = useContext(AppContext);
const trashHandler = () =>
@ -60,24 +44,6 @@ export default function DeduplicateOptions({
{formatNumber(count)} {t('SELECTED')}
</Box>
</FluidContainer>
<input
type="checkbox"
style={{
width: '1em',
height: '1em',
}}
value={
deduplicateContext.clubSameTimeFilesOnly ? 'true' : 'false'
}
onChange={() => {
deduplicateContext.setClubSameTimeFilesOnly(
!deduplicateContext.clubSameTimeFilesOnly
);
}}></input>
<CheckboxText>{t('CLUB_BY_CAPTURE_TIME')}</CheckboxText>
<div>
<VerticalLine />
</div>
<Tooltip title={t('DELETE')}>
<IconButton onClick={trashHandler}>
<DeleteIcon />