Fix formatting issues

This commit is contained in:
Manav Rathi 2024-03-06 15:51:26 +05:30
parent af2ccf7449
commit d57e59493b
4 changed files with 15 additions and 14 deletions

View file

@ -17,16 +17,16 @@ import DownloadManager, {
LivePhotoSourceURL,
SourceURLs,
} from "services/download";
import {
handleSelectCreator,
updateFileMsrcProps,
updateFileSrcProps,
} from "utils/photoFrame";
import { EnteFile } from "types/file";
import {
SelectedState,
SetFilesDownloadProgressAttributesCreator,
} from "types/gallery";
import {
handleSelectCreator,
updateFileMsrcProps,
updateFileSrcProps,
} from "utils/photoFrame";
import { PhotoList } from "./PhotoList";
import { DedupePhotoList } from "./PhotoList/dedupe";
import PreviewCard from "./pages/gallery/PreviewCard";
@ -234,7 +234,7 @@ const PhotoFrame = ({
const handleSelect = handleSelectCreator(
setSelected,
activeCollectionID,
setRangeStart
setRangeStart,
);
const onHoverOver = (index: number) => () => {

View file

@ -1017,7 +1017,8 @@ export default function Gallery() {
isClipSearchResult,
selectedFile: selected,
setSelectedFiles: setSelected,
}}>
}}
>
<FullScreenDropZone
getDragAndDropRootProps={getDragAndDropRootProps}
>

View file

@ -1,7 +1,7 @@
import { FILE_TYPE } from "constants/file";
import { EnteFile } from "types/file";
import { logError } from "@ente/shared/sentry";
import { FILE_TYPE } from "constants/file";
import { LivePhotoSourceURL, SourceURLs } from "services/download";
import { EnteFile } from "types/file";
import { SetSelectedState } from "types/gallery";
const WAIT_FOR_VIDEO_PLAYBACK = 1 * 1000;
@ -135,11 +135,11 @@ export const handleSelectCreator =
(
setSelected: SetSelectedState,
activeCollectionID: number,
setRangeStart?
setRangeStart?,
) =>
(id: number, isOwnFile: boolean, index?: number) =>
(checked: boolean) => {
if (typeof index !== 'undefined') {
if (typeof index !== "undefined") {
if (checked) {
setRangeStart(index);
} else {

View file

@ -90,10 +90,10 @@ export const isSameDay = (first, second) => {
export const getDate = (item) => {
const currentDate = item.metadata.creationTime / 1000;
const date = isSameDay(new Date(currentDate), new Date())
? t('TODAY')
? t("TODAY")
: isSameDay(new Date(currentDate), new Date(Date.now() - A_DAY))
? t('YESTERDAY')
: formatDate(currentDate);
? t("YESTERDAY")
: formatDate(currentDate);
return date;
};