chore: refactoring

This commit is contained in:
florian 2023-07-28 18:09:38 +02:00
parent f6221b6802
commit fbe06a623d
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ const GridView = ({ settings, images }: GridViewProps) => {
() =>
images
.filter(i => !isVideo(i.url)) // TODO: filter out video for now, since we don't have a good way to display them
.sort((a, b) => b.timestamp - a.timestamp), // sort by timestamp descending
.sort((a, b) => (b.timestamp && a.timestamp ? b.timestamp - a.timestamp : 0)), // sort by timestamp descending
[images]
);

View File

@ -7,7 +7,7 @@ export type NostrImage = {
author: string;
tags: string[];
content?: string;
timestamp: number;
timestamp?: number;
noteId: string;
type: 'image' | 'video';
};