chore: refactoring
This commit is contained in:
parent
f6221b6802
commit
fbe06a623d
@ -16,7 +16,7 @@ const GridView = ({ settings, images }: GridViewProps) => {
|
|||||||
() =>
|
() =>
|
||||||
images
|
images
|
||||||
.filter(i => !isVideo(i.url)) // TODO: filter out video for now, since we don't have a good way to display them
|
.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]
|
[images]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ export type NostrImage = {
|
|||||||
author: string;
|
author: string;
|
||||||
tags: string[];
|
tags: string[];
|
||||||
content?: string;
|
content?: string;
|
||||||
timestamp: number;
|
timestamp?: number;
|
||||||
noteId: string;
|
noteId: string;
|
||||||
type: 'image' | 'video';
|
type: 'image' | 'video';
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user