chore: refactoring
This commit is contained in:
parent
f6221b6802
commit
fbe06a623d
@ -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]
|
||||
);
|
||||
|
||||
|
@ -7,7 +7,7 @@ export type NostrImage = {
|
||||
author: string;
|
||||
tags: string[];
|
||||
content?: string;
|
||||
timestamp: number;
|
||||
timestamp?: number;
|
||||
noteId: string;
|
||||
type: 'image' | 'video';
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user