Sort plugin mod file list by nexus_file_id
This commit is contained in:
parent
0616a92bbc
commit
f33fd3b49c
@ -256,7 +256,7 @@ const Map: React.FC = () => {
|
||||
requestAnimationFrame(() => {
|
||||
if (map.current) map.current.resize();
|
||||
});
|
||||
}, [map]);
|
||||
}, [map, dispatch]);
|
||||
|
||||
const clearSelectedMod = useCallback(() => {
|
||||
requestAnimationFrame(() => {
|
||||
|
@ -98,6 +98,7 @@ const PluginModList: React.FC<Props> = ({ mods, files, counts }) => {
|
||||
<ul className={styles["file-list"]}>
|
||||
{files
|
||||
.filter((file) => file.mod_id === mod.id)
|
||||
.sort((a, b) => b.nexus_file_id - a.nexus_file_id)
|
||||
.map((file) => (
|
||||
<li key={file.id}>
|
||||
<div>
|
||||
|
@ -53,7 +53,7 @@ export interface File {
|
||||
version?: string;
|
||||
mod_version?: string;
|
||||
size: number;
|
||||
uploaded_at?: Date;
|
||||
uploaded_at?: number;
|
||||
has_download_link: boolean;
|
||||
updated_at: Date;
|
||||
created_at: Date;
|
||||
|
Loading…
Reference in New Issue
Block a user